/* ===== CHAOTIC FRACTALS - MAIN STYLES ===== */

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

:root {
  --black: #0a0a0a;
  --dark: #111111;
  --dark2: #1a1a1a;
  --purple: #6b3fa0;
  --purple-dark: #4a2570;
  --purple-bg: #2d1b4e;
  --gold: #c9a84c;
  --white: #f0f0f0;
  --grey: #999;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  background: transparent;
  transition: background 0.3s;
}
nav.scrolled { background: rgba(10,10,10,0.95); }

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.05em;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.6;
  filter: grayscale(30%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-text {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: normal;
  color: #e8534a;
  text-shadow: 2px 2px 20px rgba(0,0,0,0.8);
  line-height: 1.1;
}

.hero-text p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.7);
  margin-top: 1rem;
  font-style: italic;
}

/* ===== I AM SECTION ===== */
.iam-section {
  background: #fff;
  color: #222;
  padding: 5rem 3rem;
  text-align: center;
}

.iam-section h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #222;
}

.iam-bullets {
  max-width: 700px;
  margin: 0 auto 3rem;
  list-style: none;
}
.iam-bullets li {
  font-size: 1rem;
  color: #444;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
}
.iam-bullets li:last-child { border-bottom: none; }

.skill-bars {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-bar { text-align: left; }
.skill-label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}
.skill-track {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}
.skill-fill.analytics { background: #4caf50; width: 83%; }
.skill-fill.humour { background: #ffc107; width: 69%; }
.skill-fill.over { background: #2196f3; width: 97%; }

/* ===== TESTIMONIALS ===== */
.testimonials {
  position: relative;
  padding: 5rem 2rem;
  text-align: center;
  background: var(--purple-bg);
  overflow: hidden;
}

.testimonials-bg {
  position: absolute;
  inset: 0;
  background: url('/images/testimonials-bg.jpg') center/cover no-repeat;
  opacity: 0.3;
}

.testimonials h2 {
  position: relative;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2rem;
}

.testimonial-carousel { position: relative; }

.testimonial-slide {
  display: none;
  flex-direction: column;
  align-items: center;
}
.testimonial-slide.active { display: flex; }

.testimonial-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.3);
  margin-bottom: 0;
}

.testimonial-quote-box {
  background: rgba(30,40,60,0.85);
  padding: 1.5rem 2.5rem;
  margin: 1rem 0;
  max-width: 600px;
  position: relative;
}
.testimonial-quote-box::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(30,40,60,0.85);
}

.testimonial-quote {
  font-size: 1.1rem;
  color: #fff;
  font-style: italic;
}

.testimonial-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 1.5rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  position: relative;
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.dot.active { background: #5bc8d0; }

/* ===== RECENT POSTS ===== */
.recent-posts {
  background: var(--dark2);
  padding: 5rem 3rem;
}

.recent-posts h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  opacity: 0.6;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.post-card {
  background: var(--dark);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}

.post-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--dark2);
}

.post-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.1);
  font-size: 3rem;
}

.post-card-body { padding: 1.5rem; }

.post-card-cat {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--grey);
  margin-bottom: 0.8rem;
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.read-more:hover { text-decoration: underline; }

/* ===== BLOG LIST PAGE ===== */
.blog-header {
  padding: 10rem 3rem 4rem;
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.blog-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: normal;
}

.blog-header p {
  color: var(--grey);
  margin-top: 0.5rem;
}

.blog-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.blog-list-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: opacity 0.2s;
}
.blog-list-item:hover { opacity: 0.85; }

.blog-list-img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  background: var(--dark2);
}

.blog-list-placeholder {
  width: 180px;
  height: 120px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.blog-list-meta { display: flex; flex-direction: column; gap: 0.4rem; }

.blog-list-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  line-height: 1.3;
}

.blog-list-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.blog-list-cat {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.15rem 0.5rem;
}

.blog-list-date { font-size: 0.75rem; color: var(--grey); }

/* ===== SINGLE POST ===== */
.post-hero {
  width: 100%;
  height: 50vh;
  min-height: 300px;
  object-fit: cover;
  margin-top: 60px;
}

.post-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.post-meta { margin-bottom: 2rem; }
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--grey);
}

.post-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.85);
}

.post-content p { margin-bottom: 1.5rem; }
.post-content h2, .post-content h3 {
  font-family: var(--font-sans);
  margin: 2.5rem 0 1rem;
  color: var(--white);
}
.post-content a { color: var(--gold); text-decoration: underline; }
.post-content strong { color: var(--white); }
.post-content em { font-style: italic; }
.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.post-content li { margin-bottom: 0.4rem; }

/* ===== ABOUT PAGE ===== */
.about-hero {
  height: 40vh;
  min-height: 250px;
  background: var(--black);
  display: flex;
  align-items: flex-end;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.about-hero-lines {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: 
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(255,255,255,0.05) 100%);
}

/* Chaotic line animation using SVG */
.about-hero svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
}

.about-hero h1 {
  position: relative;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: normal;
  padding-top: 4rem;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
}

.about-content p { margin-bottom: 1.5rem; }

.about-content ol {
  margin: 1.5rem 0 1.5rem 1.2rem;
  counter-reset: about-counter;
  list-style: none;
}
.about-content ol li {
  counter-increment: about-counter;
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  position: relative;
}
.about-content ol li::before {
  content: counter(about-counter) ".";
  color: var(--gold);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ===== NEWSLETTER SIGNUP ===== */
.newsletter {
  background: var(--dark2);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 2rem;
  text-align: center;
}

.newsletter h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: var(--grey);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--grey);
}

/* ===== CATEGORY FILTER ===== */
.cat-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cat-btn {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1rem; }
  .skill-bars { grid-template-columns: 1fr; gap: 1rem; }
  .blog-list-item { grid-template-columns: 1fr; }
  .blog-list-img, .blog-list-placeholder { width: 100%; height: 200px; }
  .recent-posts, .blog-header, .iam-section { padding: 3rem 1.5rem; }
  footer { flex-direction: column; text-align: center; }
}
