/* ═══════════════════════════════════════
   NAZMUL HASAN · PORTFOLIO
   Islamic Editorial Aesthetic
   ═══════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --emerald: #1a7a5e;
  --emerald-light: #25a07a;
  --emerald-glow: #1a7a5e44;
  --gold: #c9a84c;
  --gold-light: #e8c96c;

  --bg: #0a0e0d;
  --bg-2: #0f1512;
  --bg-card: #111a17;
  --bg-card-2: #162019;

  --text: #e8ede9;
  --text-muted: #7a9489;
  --text-dim: #3d5248;

  --border: #1e2e28;
  --border-light: #2a3d35;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-arabic: 'Noto Naskh Arabic', serif;

  --nav-h: 68px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f5f2ec;
  --bg-2: #eeeae0;
  --bg-card: #faf8f3;
  --bg-card-2: #f0ede5;
  --text: #1a2218;
  --text-muted: #4a6858;
  --text-dim: #9ab3a5;
  --border: #d8d0c0;
  --border-light: #c8c0b0;
  --emerald-glow: #1a7a5e22;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--emerald); border-radius: 2px; }

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  transition: width 0.1s linear;
}

/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: var(--bg-2);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.logo-ar {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

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

.nav-link {
  font-size: 0.875rem; font-weight: 400; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  position: relative; padding-bottom: 2px;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50px; padding: 0.35rem 0.75rem;
  cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text-muted);
}

.theme-toggle:hover { border-color: var(--emerald); color: var(--text); }

.toggle-icon { font-size: 0.9rem; transition: opacity var(--transition); }
[data-theme="dark"] .sun { opacity: 0.3; }
[data-theme="dark"] .moon { opacity: 1; }
[data-theme="light"] .sun { opacity: 1; }
[data-theme="light"] .moon { opacity: 0.3; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}

.geo-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, var(--emerald-glow) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201,168,76,0.06) 0%, transparent 40%);
}

/* Islamic star pattern via CSS */
.geo-pattern::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(30deg, transparent, transparent 40px, rgba(26,122,94,0.03) 40px, rgba(26,122,94,0.03) 41px),
    repeating-linear-gradient(-30deg, transparent, transparent 40px, rgba(26,122,94,0.03) 40px, rgba(26,122,94,0.03) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(26,122,94,0.03) 40px, rgba(26,122,94,0.03) 41px);
}

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,122,94,0.15) 0%, transparent 70%);
  top: -100px; left: -100px;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  bottom: 0; right: 10%;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-salaam {
  font-family: var(--font-arabic); font-size: 1.1rem;
  color: var(--gold); letter-spacing: 0.02em;
  margin-bottom: 1.5rem; opacity: 0.9;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-name em {
  font-style: italic; color: var(--emerald-light);
}

.name-md {
  font-size: 0.55em; color: var(--text-muted);
  vertical-align: top; margin-top: 0.3em;
  display: inline-block; margin-right: 0.2em;
}

.hero-title {
  font-size: 1rem; font-weight: 400; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── PHOTO FRAME ── */
.hero-photo { position: relative; }

.photo-frame {
  position: relative;
  width: 320px; height: 400px;
}

.portrait {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: var(--radius-lg);
  filter: brightness(0.95) contrast(1.05);
}

/* Corner ornaments */
.photo-ornament {
  position: absolute; width: 30px; height: 30px;
  border-color: var(--gold); border-style: solid;
  opacity: 0.7;
}

.photo-ornament.top-left  { top: -8px; left: -8px;  border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.photo-ornament.top-right { top: -8px; right: -8px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.photo-ornament.bot-left  { bottom: -8px; left: -8px;  border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.photo-ornament.bot-right { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px; font-family: var(--font-body);
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.03em;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--emerald); border-color: var(--emerald); color: #fff;
}

.btn-primary:hover {
  background: var(--emerald-light); border-color: var(--emerald-light);
  box-shadow: 0 0 24px rgba(26,122,94,0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent; border-color: var(--border-light); color: var(--text-muted);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-full { width: 100%; justify-content: center; }

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-dim); font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ── SECTIONS ── */
.section { padding: 6rem 0; }

.section-header { margin-bottom: 3.5rem; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--emerald-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300; line-height: 1.15;
  color: var(--text);
}

.section-title em {
  font-style: italic; color: var(--emerald-light);
}

/* ── ABOUT ── */
.about { background: var(--bg-2); }

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

.about-text .lead {
  font-size: 1.1rem; font-weight: 400; line-height: 1.8;
  margin-bottom: 1.25rem; color: var(--text);
}

.about-text p {
  font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem;
}

.about-chips {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem;
}

.chip {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 50px; padding: 0.35rem 0.9rem;
  font-size: 0.8rem; color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.chip:hover { border-color: var(--emerald); color: var(--text); }

.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; padding-bottom: 0; }

.info-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
  flex-shrink: 0;
}

.info-value {
  font-size: 0.875rem; color: var(--text); text-align: right;
}

.status-active { color: var(--emerald-light); }

.about-quote {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}

.about-quote p {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--text); margin-bottom: 0.5rem;
}

.about-quote cite {
  font-size: 0.78rem; color: var(--gold); letter-spacing: 0.05em;
}

/* ── SKILLS ── */
.skills { background: var(--bg); }

.skills-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}

.skill-category {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-category:hover {
  border-color: var(--emerald);
  box-shadow: 0 0 20px rgba(26,122,94,0.1);
}

.skill-cat-title {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 400;
  color: var(--text); margin-bottom: 1.25rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}

.skill-list { display: flex; flex-direction: column; gap: 1rem; }

.skill-info {
  display: flex; justify-content: space-between;
  font-size: 0.875rem; color: var(--text); margin-bottom: 0.4rem;
}

.skill-range {
  font-size: 0.75rem; color: var(--text-muted);
}

.skill-bar {
  height: 5px; background: var(--bg-2);
  border-radius: 3px; overflow: hidden;
}

.skill-fill {
  height: 100%; width: 0; /* animated by JS */
  background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── PROJECTS ── */
.projects { background: var(--bg-2); }

.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}

.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: default;
}

.project-card:hover {
  border-color: var(--emerald); transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.project-inner { display: flex; flex-direction: column; gap: 0.75rem; }

.project-icon {
  font-size: 1.75rem; color: var(--emerald-light); margin-bottom: 0.25rem;
}

.project-title {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 400;
  color: var(--text);
}

.project-desc {
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.6;
}

.coming-badge {
  display: inline-block; align-self: flex-start;
  background: rgba(201,168,76,0.12); border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold); border-radius: 50px;
  padding: 0.2rem 0.8rem; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; margin-top: 0.5rem;
}

.add-card {
  border-style: dashed; opacity: 0.5;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--text-muted);
}

.add-card .project-icon { font-size: 2rem; color: var(--text-dim); }

/* ── CONTACT ── */
.contact { background: var(--bg); }

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

.contact-text .lead {
  font-size: 1.05rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.8;
}

.social-links { display: flex; flex-direction: column; gap: 1rem; }

.social-link {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  font-size: 0.9rem; color: var(--text-muted);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--emerald); color: var(--text);
  transform: translateX(4px);
}

.social-icon {
  width: 32px; height: 32px;
  background: var(--bg-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--emerald-light);
  flex-shrink: 0;
}

/* ── CONTACT FORM ── */
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
}

.form-group input,
.form-group textarea {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(26,122,94,0.15);
}

.form-note {
  font-size: 0.8rem; color: var(--emerald-light); text-align: center;
  min-height: 1.2em;
}

/* ── FOOTER ── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  text-align: center;
}

.footer-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 1rem; color: var(--text);
}

.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

.footer-arabic {
  font-family: var(--font-arabic); font-size: 0.95rem;
  color: var(--gold); opacity: 0.7;
}

/* ── ANIMATIONS ── */
.animate-in {
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* ── MOBILE MENU ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed; inset: var(--nav-h) 0 0 0;
    background: var(--bg-2);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 99;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1.1rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center; gap: 2.5rem;
    padding: 2rem 1.5rem 4rem;
  }

  .hero-photo { order: -1; margin: 0 auto; }
  .photo-frame { width: 240px; height: 300px; }
  .hero-cta { justify-content: center; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

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

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

  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.6rem; }
  .photo-frame { width: 200px; height: 260px; }
  .contact-form { padding: 1.25rem; }
}

/* ── HAMBURGER ANIMATION ── */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
