/*
Theme Name: Mohammed Albiek Portfolio
Theme URI: https://example.com/albiek-portfolio
Author: Mohammed Albiek
Author URI: https://example.com
Description: A high-fidelity conversion of the Mohammed Albiek portfolio HTML. Features custom SVG ink effects, floating leaves, and a minimalist aesthetic.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: albiek-portfolio
*/

/* WordPress Core Styles */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.wp-caption { border: 1px solid #ccc; background: #eee; padding: 10px; max-width: 100%; }
.wp-caption-text { text-align: center; font-size: 0.8em; margin: 0; }
.sticky { background: #f9f9f9; border: 1px solid #ddd; }
.gallery-caption { font-size: 0.8em; }
.bypostauthor { font-style: italic; }

/* Design System Variables */
:root {
  --bg-color: #f6f5f1;
  --ink-color: #1a1a1a;
  --red-seal: #8a1c1c;
}

/* Base Styles */
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-color);
  color: var(--ink-color);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Typography */
.font-serif-heading { font-family: 'Playfair Display', serif; }
.font-chinese-brush { font-family: 'Ma Shan Zheng', cursive; }
.font-arabic { font-family: 'Gulzar', serif; }

/* Paper Texture */
.paper-texture {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Animations & Effects */
.sway {
  animation: swayAnim 12s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
@keyframes swayAnim {
  0% { transform: rotate(-1deg); }
  100% { transform: rotate(1deg); }
}

.leaf-float {
  position: fixed;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 40;
}

.leaf-1 { animation: floatLeaf1 22s ease-in-out infinite; }
.leaf-2 { animation: floatLeaf2 28s ease-in-out infinite; animation-delay: 4s; }
.leaf-3 { animation: floatLeaf3 25s ease-in-out infinite; animation-delay: 8s; }
.leaf-4 { animation: floatLeaf4 30s ease-in-out infinite; animation-delay: 2s; }
.leaf-5 { animation: floatLeaf5 24s ease-in-out infinite; animation-delay: 12s; }
.leaf-6 { animation: floatLeaf6 26s ease-in-out infinite; animation-delay: 6s; }
.leaf-7 { animation: floatLeaf7 20s ease-in-out infinite; animation-delay: 15s; }

@keyframes floatLeaf1 {
  0%   { opacity: 0; transform: translate(-5vw, -5vh) rotate(0deg) scale(0.8); }
  8%   { opacity: 0.5; }
  50%  { opacity: 0.6; transform: translate(50vw, 45vh) rotate(120deg) scale(0.7); }
  92%  { opacity: 0.4; }
  100% { opacity: 0; transform: translate(105vw, 95vh) rotate(220deg) scale(0.6); }
}
@keyframes floatLeaf2 {
  0%   { opacity: 0; transform: translate(80vw, -8vh) rotate(30deg) scale(0.6); }
  10%  { opacity: 0.45; }
  50%  { opacity: 0.5; transform: translate(40vw, 50vh) rotate(-90deg) scale(0.55); }
  90%  { opacity: 0.3; }
  100% { opacity: 0; transform: translate(-5vw, 105vh) rotate(-200deg) scale(0.5); }
}
@keyframes floatLeaf3 {
  0%   { opacity: 0; transform: translate(30vw, -10vh) rotate(-20deg) scale(1); }
  8%   { opacity: 0.55; }
  45%  { opacity: 0.5; transform: translate(65vw, 40vh) rotate(80deg) scale(0.85); }
  90%  { opacity: 0.35; }
  100% { opacity: 0; transform: translate(100vw, 100vh) rotate(160deg) scale(0.7); }
}
@keyframes floatLeaf4 {
  0%   { opacity: 0; transform: translate(90vw, 10vh) rotate(45deg) scale(0.7); }
  10%  { opacity: 0.4; }
  55%  { opacity: 0.45; transform: translate(30vw, 55vh) rotate(-60deg) scale(0.65); }
  92%  { opacity: 0.3; }
  100% { opacity: 0; transform: translate(-10vw, 100vh) rotate(-150deg) scale(0.5); }
}
@keyframes floatLeaf5 {
  0%   { opacity: 0; transform: translate(10vw, -5vh) rotate(10deg) scale(0.9); }
  8%   { opacity: 0.5; }
  50%  { opacity: 0.55; transform: translate(70vw, 50vh) rotate(140deg) scale(0.75); }
  90%  { opacity: 0.35; }
  100% { opacity: 0; transform: translate(110vw, 90vh) rotate(260deg) scale(0.6); }
}
@keyframes floatLeaf6 {
  0%   { opacity: 0; transform: translate(60vw, -8vh) rotate(-30deg) scale(0.65); }
  10%  { opacity: 0.4; }
  50%  { opacity: 0.45; transform: translate(20vw, 45vh) rotate(70deg) scale(0.6); }
  90%  { opacity: 0.3; }
  100% { opacity: 0; transform: translate(-5vw, 95vh) rotate(180deg) scale(0.5); }
}
@keyframes floatLeaf7 {
  0%   { opacity: 0; transform: translate(45vw, -5vh) rotate(60deg) scale(0.75); }
  8%   { opacity: 0.45; }
  50%  { opacity: 0.5; transform: translate(80vw, 55vh) rotate(-50deg) scale(0.65); }
  92%  { opacity: 0.35; }
  100% { opacity: 0; transform: translate(105vw, 105vh) rotate(-170deg) scale(0.55); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--ink-color);
  margin-top: 12px;
  opacity: 0.3;
}
.section-heading-center::after {
  margin-left: auto;
  margin-right: auto;
}

.card-hover {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.15);
  color: #666;
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink-color);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease-out forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }

/* Line Clamp Utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination Styles */
.navigation.pagination {
  display: flex;
  justify-content: center;
}
.navigation.pagination .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.navigation.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}
.navigation.pagination .page-numbers:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}
.navigation.pagination .page-numbers.current {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.navigation.pagination .page-numbers.dots {
  border: none;
  background: none;
}

/* WordPress Block Editor Styles */
.wp-block-image { margin: 2rem 0; }
.wp-block-image img { max-width: 100%; height: auto; }
.wp-block-quote {
  border-left: 3px solid var(--ink-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}
.wp-block-code {
  background: #f3f4f6;
  padding: 1rem;
  font-family: monospace;
  font-size: 14px;
  overflow-x: auto;
}
