/* ── KATIB IMAMUDDIN — MAIN STYLESHEET ── */

:root {
  --ink: #0d1b2e;
  --parchment: #e8f0fb;
  --gold: #2a6fc9;
  --gold-light: #6aaaf0;
  --gold-dark: #1a4a8a;
  --deep: #0a1628;
  --muted: #6a85a8;
  --border: rgba(42,111,201,0.25);
  --white: #f5f9ff;
  --bg-section-alt: #f0f5ff;
  --text-dark: #0d1b2e;
  --text-mid: #2d4a6e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: #ffffff;
  color: var(--text-dark);
  font-family: 'Cormorant Garamond', Georgia, serif;
  overflow-x: hidden;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.97), rgba(255,255,255,0));
  backdrop-filter: blur(4px);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-decoration: none;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover { opacity: 1; color: var(--gold); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0d1b2e 0%, #1a3a6e 55%, #2a6fc9 100%);
}

.hero-bg-calligraphy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
}

.hero-bg-calligraphy span {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(8rem, 25vw, 22rem);
  color: #6aaaf0;
  line-height: 1;
  user-select: none;
}

.hero-ornament {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.hero-ornament::before,
.hero-ornament::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.4rem;
}

.hero-ornament::before { left: -14px; }
.hero-ornament::after { right: -14px; }

.hero-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: #a8cff5;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.hero-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
  line-height: 1.1;
}

.hero-name span { color: #6aaaf0; }

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  color: rgba(255,255,255,0.55);
  margin: 1.2rem 0 2.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: inline-block;
  padding: 0.9rem 2.8rem;
  border: 1px solid rgba(255,255,255,0.5);
  color: #ffffff;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  position: relative;
  z-index: 1;
}

.hero-cta:hover { background: #ffffff; color: var(--ink); border-color: #ffffff; }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.4;
  z-index: 1;
}

.scroll-hint span { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; }

.scroll-line {
  width: 1px;
  height: 40px;
  background: #fff;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* ── SECTIONS ── */
section { position: relative; z-index: 1; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 4rem;
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-divider {
  width: 80px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 3rem;
}

/* ── ABOUT ── */
#about { background: #ffffff; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-mid);
  margin-bottom: 1.2rem;
}

.about-text p em { color: var(--gold); font-style: italic; }

.about-visual { display: flex; align-items: center; justify-content: center; }

.bismillah-visual {
  text-align: center;
  width: 100%;
}

.bismillah-svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--gold);
}

.bismillah-visual .arabic-sub {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  display: block;
  margin-top: 0.8rem;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 2rem;
}

.service-tag {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.service-tag::before {
  content: '◆';
  color: var(--gold);
  font-size: 0.4rem;
  flex-shrink: 0;
}

/* ── PORTFOLIO ── */
#portfolio { background: var(--bg-section-alt); }

.portfolio-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(42,111,201,0.06);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── PORTFOLIO ITEM ── */
.portfolio-item {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(42,111,201,0.15);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.portfolio-item:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42,111,201,0.12);
}

.portfolio-artwork {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #e8f0fb;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.portfolio-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-artwork img { transform: scale(1.04); }

/* PDF thumbnail placeholder */
.portfolio-artwork.is-pdf {
  background: #e8f0fb;
  flex-direction: column;
  gap: 0.8rem;
}

.pdf-icon {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.7;
}

.pdf-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.portfolio-item-info {
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(42,111,201,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.portfolio-item-info h3 {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dark);
}

.portfolio-item-info span {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,27,46,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 1.5rem;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-overlay p {
  font-size: 0.9rem;
  color: #a8cff5;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.btn-view-image {
  display: none;
  padding: 0.6rem 1.6rem;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.5);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-view-image:hover { border-color: #fff; color: #fff; }

@media (hover: none) and (pointer: coarse) {
  .btn-view-image { display: block; }
}

.btn-like {
  padding: 0.6rem 1.6rem;
  background: var(--gold);
  color: #ffffff;
  border: none;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: uppercase;
}

.btn-like:hover { background: var(--gold-light); }

/* PDF open button */
.btn-open-pdf {
  padding: 0.45rem 1.2rem;
  background: transparent;
  color: #a8cff5;
  border: 1px solid rgba(168,207,245,0.4);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}

.btn-open-pdf:hover { background: rgba(168,207,245,0.1); border-color: #a8cff5; }

/* Empty category state */
.portfolio-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
  border: 1px dashed var(--border);
}

/* Loading state */
.portfolio-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-style: italic;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #ffffff;
  border: 1px solid var(--gold);
  max-width: 580px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--gold); }

.modal h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
  letter-spacing: 0.08em;
}

.modal .modal-ref {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.modal form { display: flex; flex-direction: column; gap: 1rem; }

.modal input,
.modal textarea,
.modal select {
  background: #f0f5ff;
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 0.75rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus { border-color: var(--gold); }

.modal textarea { resize: vertical; min-height: 100px; }
.modal select option { background: #ffffff; color: var(--text-dark); }

.modal-submit {
  padding: 0.85rem;
  background: var(--gold);
  color: #ffffff;
  border: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-submit:hover { background: var(--gold-dark); }

#modal-success { display: none; text-align: center; padding: 2rem 0; }
#modal-success .check { font-size: 2.5rem; color: var(--gold); margin-bottom: 0.8rem; }
#modal-success p { color: var(--text-mid); font-size: 1rem; line-height: 1.7; }

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 300;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#lightbox.open { display: flex; }
#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  cursor: default;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
#lightbox-close:hover { opacity: 1; }
.portfolio-artwork.is-clickable { cursor: zoom-in; }

/* ── CONTACT ── */
#contact { background: #ffffff; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  font-size: 1.1rem;
  background: #f0f5ff;
}

.contact-item-text h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.contact-item-text p,
.contact-item-text a {
  color: var(--text-dark);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-item-text a:hover { color: var(--gold); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.contact-form input,
.contact-form textarea {
  background: #f0f5ff;
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 0.75rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold); }

.contact-form textarea { min-height: 120px; resize: vertical; }

.contact-form button {
  padding: 0.9rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.contact-form button:hover { background: var(--gold); color: #ffffff; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ink);
  position: relative;
  z-index: 1;
}

footer .footer-brand {
  font-family: 'Cinzel', serif;
  color: #6aaaf0;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
}

footer p { color: rgba(255,255,255,0.4); font-size: 0.8rem; font-style: italic; }

.footer-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.4rem;
  color: rgba(106,170,240,0.25);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  border: 1px solid var(--gold);
  color: #ffffff;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  z-index: 500;
  display: none;
}

.toast.show { display: block; animation: fadeInUp 0.3s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .section-inner { padding: 3.5rem 1.5rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  footer { flex-direction: column; gap: 0.8rem; text-align: center; padding: 1.5rem; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ── Loading overlay ── */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: linear-gradient(160deg, #0d1b2e 0%, #1a3a6e 55%, #2a6fc9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 2rem;
}

.intro-sig-wrapper {
  position: relative;
  width: min(90vw, 600px);
  aspect-ratio: 4000 / 2399;
}

.intro-sig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.intro-done {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.intro-done.visible {
  opacity: 1;
}

.intro-name {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #ffffff;
  margin: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.intro-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  margin: 0;
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
}

.intro-name.intro-text-show,
.intro-sub.intro-text-show {
  opacity: 1;
}

.intro-skip {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  text-transform: uppercase;
}

.intro-skip:hover {
  color: #ffffff;
}

