/* ========================================
   MODERN EDITORIAL / PAPER PORTFOLIO
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500&family=Lora:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');


:root {
  --paper: #f3eadc;
  --paper-light: #fbf5eb;
  --paper-dark: #e5d6c3;
  --red: #873d42;
  --red-dark: #642c33;
  --ink: #302521;
  --muted: #76665c;
  --line: rgba(77, 54, 44, .2);

  --serif: "Lora", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --hand: "Caveat", cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.7;
  background-color: #6e3435;
  background-image:
    radial-gradient(ellipse at 12% 15%,
      rgba(255, 255, 255, .1),
      transparent 35%);
}

/* PAPER BACKGROUND */

.paper {
  max-width: 1440px;
  min-height: 100vh;
  margin: 28px auto;
  padding: 0 clamp(22px, 6vw, 85px) 50px;
  border-radius: 12px;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(80, 53, 39, .075) .55px,
      transparent .7px);

  background-size: 5px 5px;
  box-shadow: 0 25px 70px rgba(20, 8, 8, .25);
  overflow: hidden;
  position: relative;
}

/* Dimmer overlay on paper background */
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 28px,
      rgba(77, 54, 44, .04) 28px,
      rgba(77, 54, 44, .04) 29px),
    repeating-linear-gradient(90deg,
      transparent,
      transparent 28px,
      rgba(77, 54, 44, .03) 28px,
      rgba(77, 54, 44, .03) 29px);
  pointer-events: none;
  z-index: 0;
}

.paper>* {
  position: relative;
  z-index: 1;
}

/* NAVIGATION */

.navbar {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.logo {
  font-family: var(--hand);
  font-size: 2.8rem;
  color: var(--red-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 27px;
}

.nav-links a {
  font-family: var(--serif);
  text-decoration: none;
  color: var(--ink);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--red);
  transition: width .25s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.contact-btn {
  text-decoration: none;
  background: var(--red);
  color: white;
  padding: 10px 19px;
  border-radius: 30px;
  font-size: .85rem;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

/* RESUME BUTTON */

.resume-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  text-decoration: none;
  color: var(--red);
  border: 1px solid var(--red);

  padding: 10px 19px;
  border-radius: 30px;

  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;

  transition: all .25s ease;
}

.resume-btn:hover {
  background: var(--red);
  color: var(--paper-light);
  transform: translateY(-2px);
}

/* TYPOGRAPHY */

h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.05em;
  margin: 18px 0;
}

h1 span {
  color: var(--red);
  font-style: italic;
}

h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.eyebrow {
  color: var(--red);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.handwriting {
  font-family: var(--hand);
  font-size: 2rem;
  color: var(--red);
}

.page-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.bismillah {
  font-family: serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.eyebrow {
  letter-spacing: 2px;
  text-transform: uppercase;
}


/* HOME HERO */

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 50px;
  padding: 85px 0;
}

.hero-text h2 {
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.hero-text>p:not(.eyebrow) {
  color: var(--muted);
  max-width: 550px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 30px;
  text-decoration: none;
  font: 600 .9rem var(--sans);
  cursor: pointer;
  transition: .25s;
}

.primary-btn {
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
}

.primary-btn:hover {
  background: var(--red-dark);
  transform: translateY(-3px);
}

.secondary-btn {
  color: var(--red);
  border: 1px solid var(--red);
}

.secondary-btn:hover {
  background: rgba(135, 61, 66, .08);
}

/* POLAROID */

.portrait {
  position: relative;
  max-width: 460px;
  width: 100%;
  margin: auto;
  transform: rotate(3deg);
}

.photo-paper {
  padding: 15px 15px 55px;
  background: var(--paper-light);
  box-shadow: 0 15px 35px rgba(65, 43, 33, .15);
}

.photo-paper img {
  width: 100%;
  object-fit: cover;
  object-position: left center;
  filter: sepia(.2);
  display: block;
}

.photo-paper p {
  text-align: center;
  font: 2rem var(--hand);
  color: var(--red);
  margin-top: 8px;
}

.hand-note {
  position: absolute;
  right: -55px;
  bottom: 35px;
  font: 1.6rem var(--hand);
  color: var(--red);
  transform: rotate(-10deg);
}

/* EXPERTISE */

.expertise {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
  margin: 10px 0 50px;
}

.expertise-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.expertise-head h2 {
  font-size: 1.45rem;
  color: var(--ink);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.expertise-item {
  padding-left: 16px;
  border-left: 2px solid var(--red);
}

.expertise-item h3 {
  font-size: 1.15rem;
  margin: 4px 0 6px;
  color: var(--ink);
}

.expertise-item p {
  font-size: .9rem;
  color: var(--muted);
}

/* CARDS */

.home-cards,
.skills-grid,
.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 30px 0;
}

.education-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.education-header img {
  width: 85px;
  height: 85px;
  object-fit: contain;
  flex-shrink: 0;
}

.paper-card {
  background: rgba(255, 249, 239, .65);
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: 5px 8px 18px rgba(70, 48, 35, .07);
  position: relative;
}

.paper-card h2 {
  font-size: 1.5rem;
  margin: 10px 0;
}

.paper-card p {
  color: var(--muted);
}

.paper-card a:not(.primary-btn) {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
  font-size: .85rem;
}

.card-number {
  color: var(--red);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
}



/* BREADCRUMB */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-size: .82rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.breadcrumb a:hover {
  color: var(--red);
}

.breadcrumb .separator {
  color: var(--line);
  font-size: .7rem;
}

.breadcrumb .current {
  color: var(--red);
  font-weight: 600;
}

/* INNER PAGES */

.page-content {
  padding: 65px 0;
}

.about-layout {
  grid-template-columns: 1.2fr .8fr;
}

.about-note {
  transform: rotate(1deg);
  padding-bottom: 28px;
  z-index: 2;
}

.about-note ul {
  padding-left: 20px;
  color: var(--muted);
  margin-top: 15px;
}

.about-note-photo {
  position: relative;
  width: 195px;
  margin-left: auto;
  /* Push to the right side */
  margin-top: 16px;
  margin-bottom: -150px;
  /* Makes it hang outside the bottom of the card */
  padding: 8px 8px 22px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(65, 43, 33, .18);
  transform: rotate(4deg);
  transition: transform .3s ease;
}


.about-note-photo img {
  width: 100%;
  object-fit: cover;
  object-position: left center;
  filter: sepia(.12);
  display: block;
}

.about-extra {
  margin-top: 30px;
  margin-top: 40px;
}

.beyond-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.polaroid-frame {
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: 10px 10px 14px;
  box-shadow: 0 12px 26px rgba(65, 43, 33, .13);
  transition: transform .3s ease, box-shadow .3s ease;
}

.polaroid-frame:nth-child(1) {
  transform: rotate(-2deg);
}

.polaroid-frame:nth-child(2) {
  transform: rotate(1.5deg);
}

.polaroid-frame:nth-child(3) {
  transform: rotate(-1.5deg);
}

.polaroid-frame:hover {
  transform: rotate(0) translateY(-6px);
  box-shadow: 0 18px 34px rgba(65, 43, 33, .2);
}

.polaroid-frame img,
.polaroid-frame video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: sepia(.12);
  display: block;
}

.polaroid-frame figcaption {
  text-align: center;
  font-family: var(--hand);
  font-size: 1.45rem;
  color: var(--red);
  margin-top: 8px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 35px;
}

.project-card {
  background: var(--paper-light);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px rgba(70, 48, 35, .1);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(70, 48, 35, .18);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-dark);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-info {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-category {
  display: inline-block;
  background: rgba(135, 61, 66, .1);
  color: var(--red);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  width: fit-content;
}

.project-info h2 {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-info p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-tags span {
  background: var(--red);
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
}

/* Keep .tags for other pages that may still use them */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tags span {
  border: 1px solid rgba(135, 61, 66, .3);
  color: var(--red-dark);
  border-radius: 30px;
  padding: 5px 12px;
  font-size: .78rem;
}

/* SKILLS */

.skills-grid {
  grid-template-columns: repeat(2, 1fr);
}

.skills-note,
.education-note {
  margin-top: 25px;
  text-align: center;
}

/* EDUCATION */

.education-list {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.edu-card {
  border-radius: 12px;
  padding: 26px 28px;
}

.edu-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.edu-logo {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.edu-logo-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--red-dark);
  letter-spacing: .04em;
}

.edu-meta h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0;
}

.edu-meta h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

.edu-desc {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}


/* CONTACT */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 850px;
  margin: 45px auto 0;
}

.contact-card {
  padding: 45px;
}

.contact-message {
  max-width: 600px;
}

.contact-message h2 {
  font-size: 2.3rem;
  margin: 8px 0 12px;
}

.contact-message>p:not(.handwriting) {
  color: var(--muted);
  max-width: 540px;
}

.contact-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-label {
  color: var(--red);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
}

.contact-email {
  color: var(--red-dark);
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.contact-email:hover,
.social-links a:hover {
  color: var(--red);
  text-decoration: underline;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.social-links a {
  color: var(--red-dark);
  font-weight: 600;
  text-decoration: none;
}

.contact-note {
  margin-top: 35px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: .9rem;
}

/* CONTACT RESPONSIVE */

@media (max-width: 600px) {
  .contact-card {
    padding: 28px 22px;
  }

  .contact-details {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .contact-message h2 {
    font-size: 1.9rem;
  }
}


/* PROJECT MODAL */

.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 15, .7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  background: var(--paper-light);
  border-radius: 14px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(20, 8, 8, .35);
  position: relative;
  transform: translateY(30px) scale(.96);
  transition: transform .35s ease;
}

.project-modal-overlay.active .project-modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.modal-close:hover {
  background: var(--red);
}

.modal-image {
  width: 100%;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: var(--paper-dark);
}

.modal-image img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.modal-body {
  padding: 28px 32px 32px;
}

.modal-body .project-category {
  display: inline-block;
  background: rgba(135, 61, 66, .1);
  color: var(--red);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.modal-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.modal-body>p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-details {
  margin-bottom: 22px;
}

.modal-details h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 10px;
}

.modal-details ul {
  padding-left: 20px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-body .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-body .project-tags span {
  background: var(--red);
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
}

.project-card[data-modal] {
  cursor: pointer;
}

@media (max-width: 600px) {
  .project-modal-overlay {
    padding: 15px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-body h2 {
    font-size: 1.3rem;
  }
}

/* FOOTER */

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 50px;
  color: var(--muted);
  font-size: .82rem;
}

footer a {
  color: var(--red);
  text-decoration: none;
}

/* REVEAL ANIMATION */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media(max-width: 1050px) {
  .navbar {
    gap: 15px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: .88rem;
  }

  .contact-btn,
  .resume-btn {
    padding: 8px 14px;
    font-size: .8rem;
  }
}

@media(max-width: 850px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--paper-light);
    padding: 25px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .home-cards {
    grid-template-columns: 1fr 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-cards .paper-card:last-child {
    grid-column: 1 / -1;
  }

  .beyond-gallery {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 24px auto 0;
  }

  .about-note {
    padding-bottom: 28px;
  }

  .about-note-photo {
    position: relative;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 240px;
    margin: 20px auto 0;
    transform: rotate(2deg);
  }
}

@media(max-width: 600px) {
  .paper {
    margin: 0;
    padding: 0 20px 35px;
  }

  .navbar {
    min-height: 75px;
  }

  .contact-btn {
    display: none;
  }

  .resume-btn {
    padding: 8px 13px;
    font-size: .78rem;
    white-space: nowrap;
  }


  .hero {
    grid-template-columns: 1fr;
    padding: 55px 0;
  }

  .portrait {
    width: 75%;
    margin-top: 20px;
  }

  .home-cards,
  .expertise-grid,
  .about-layout,
  .skills-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

  .home-cards .paper-card:last-child {
    grid-column: auto;
  }

  .page-content {
    padding: 45px 0;
  }

  .edu-card {
    padding: 20px;
  }

  .edu-logo {
    width: 66px;
    height: 66px;
  }

  footer {
    flex-direction: column;
  }
}

@media(prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 850px) {
  .navbar {
    position: relative;
    z-index: 100;
  }

  .nav-links.open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;

    padding: 25px 30px;
    background: var(--paper-light);
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

    z-index: 1000;
  }
}