/* ===========================
   TABLE OF CONTENTS
   1. Design Tokens
   2. Global Styles
   3. Typography
   4. Header & Navigation
   5. Hero Sections
   6. Animations
   7. Sections Backgrounds
   8. Utilities
================================ */

/* ======= Design System – Color Tokens ======= */
/* ==== Light Theme ===== */
:root{
  /* Core brand roles */
  --primary: #1C0B00; 
  --comp: #217bbe; 
  --secondary: #DBA256FF ; 
  --accent: #FAF7F2; 
  --neutral: #DEDCD9; 
  --links: #ff8903;

   /* Icons */
  --icon-default: #0281a1; 
 
  /* Surface layers */
  --surface: #FFFFFF; 
  --surface-01: #F8F6F3; 
  --bg-default: var(--accent);

  /* Text colors */
  --text-primary: var(--primary);
  --text-secondary: #4A3B35; 
  --text-muted: #6F665F; 

  /* Borders / strokes */
  --border: var(--neutral);
  --divider: #E9E5E0; 

  /* Shadows */
  --shadow-sm: 0 6px 18px rgba(42,31,27,0.06); 

  /* Buttons */
  --btn-primary-bg: var(--comp);
  --btn-primary-color: var(--surface);
  --btn-primary-bg-hover: var(--secondary);

  --btn-secondary-bg: var(--secondary);
  --btn-secondary-color: var(--secondary);
  --btn-secondary-bg-hover: #C0AB88; 

  /* Link colors */
  --link: var(--primary);
  --link-hover: var(--links);
  --link-active: var(--links);
  --link-focus-ring: rgba(41,31,27,0.12); 

  /* Semantic helpers */
  --success: #2E7D32; 
  --warning: #B08900; 
  --danger:  #A3382B; 
}

/* ===========================
   Dark Theme
=========================== */
html.dark {
  /* Core brand roles */
  --primary: #FFFFFF;
  --comp: #4EA1E3;
  --secondary: #696a6b; 
  --accent: #383838;
  --neutral: #454545; 
  --links: #ff8903; 

  /* Icons */
  --icon-default: #737373; 

  /* Surface layers */
  --surface: #141414; 
  --surface-01: #1F1F1F;
  --bg-default: #0F0F0F;

  /* Text */
  --text-primary: #F5EFEA;
  --text-secondary: #CFC7C2;
  --text-muted: #9B948F;

  /* Borders */
  --border: #2E2E2E;
  --divider: #9c9c9c;

  /* Shadows (lighter, subtle) */
  --shadow-sm: 0 6px 18px rgba(0,0,0,0.35);

  /* Buttons */
  --btn-primary-bg: #4EA1E3;
  --btn-primary-color: #0F0F0F;
  --btn-primary-bg-hover: #6CB6F0;

  --btn-secondary-bg: #2A2A2A;
  --btn-secondary-color: #E0B873;
  --btn-secondary-bg-hover: #3A3A3A;

  /* Links */
  --link: #F5EFEA;
  --link-hover: #FFB703;
  --link-active: #FFB703;
  --link-focus-ring: rgba(255,183,3,0.25);

  /* Semantic */
  --success: #4CAF50;
  --warning: #FBC02D;
  --danger:  #EF5350;
}

/*====== Global Styles ======= */
body {
  font-family: 'Lato', Roboto, Arial, sans-serif;
  background-color: var(--accent);
  color: var(--text-primary);
  margin: 0;
}

/* Headings & UI Typography */
h1, h2, h3, h4, h5, h6,
button,
.nav-desktop,
.nav-mobile {
  font-family: 'Heebo', Roboto, Arial, sans-serif;
}
/* link Styles */
a.site-link {
  color: var(--link);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
  outline: none;
}

a.site-link:hover,
a.site-link:focus {
  color: var(--link-hover);
  text-decoration: none;
}
a.site-link:active {
  color: var(--link-active);
}

a.site-link:focus-visible {
  box-shadow: 0 0 0 4px var(--link-focus-ring);
  border-radius: 6px;
}
/* Active link color */
.site-link.active {
  color: var(--link-active);
}
/* Icon color */
.icon-primary {
  color: var(--icon-default);
}

/* ===== Hero Backgrounds ===== */

/* Hero section-bg Pattern*/
.home-hero {
  position: relative;
  z-index: 0;
  background-image: url('../images/patterns/egg-shell.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: center;
  
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.1); 
}
/* ============================================
   Hero Sections bg Images (Light + Dark Theme)
=============================================== */

/* Base hero section styles */
.services-hero,
.portfolio-hero,
.contact-hero {
  position: relative;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh;
  max-height: 720px;
}

/* Individual background images */
.services-hero {
  background-image: url('../images/preview/services-bg.png');
}

.portfolio-hero {
  background-image: url('../images/preview/portfolio-bg.png');
}

.contact-hero {
  background-image: url('../images/preview/contact-bg.png');
}

/* Overlay for all hero sections */
.services-hero::before,
.portfolio-hero::before,
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0; 
  z-index: -1; 
  background-color: var(--primary); 
  opacity: 0.55; /* adjust for contrast */
  pointer-events: none; 
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* ====== Header =======*/
.site-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: transparent; 
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Sticky header state */
.site-header.header-scrolled {
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  max-width: 1280px; 
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem; 
}

.site-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
}

/* ====== Theme Toggle Button ====== */
.theme-toggle {
  width: 52px;
  height: 28px;
  border-radius: 999px; /* pill shape */
  background-color: var(--neutral); /* light theme bg */
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 3px;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease;
  margin-left: 1rem; /* spacing from nav/logo */
}

/* Thumb inside toggle */
.theme-toggle .toggle-thumb {
  width: 22px;
  height: 22px;
  background-color: var(--surface);
  color: var(--icon-default);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transform: translateX(0);
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}

/* Dark mode active styles */
html.dark .theme-toggle {
  background-color: var(--secondary);
}

html.dark .theme-toggle .toggle-thumb {
  transform: translateX(24px);
  background-color: var(--primary);
  color: var(--surface);
}


/* Desktop Navigation */
.nav-desktop ul {
  display: flex;
  gap: 2rem; 
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
}

.nav-desktop ul li a {
  color: var(--link);
  text-decoration: none;
}

.nav-desktop ul li a:hover,
.nav-desktop ul li a:focus {
  color: var(--link-hover);
}

/* Mobile Hamburger */
.nav-mobile-toggle {
  display: none;
}

.hamburger-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
}

.hamburger-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Menu */
.nav-mobile {
  background-color: var(--accent);
}
.hidden {
  display: none !important;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-mobile ul li a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
/* Mobile Menu Item Dividers */
.nav-mobile ul li:not(:last-child)::after {
  content: '';
  display: block;
  height: 1px;               /* thickness of divider */
  background-color: rgba(0,0,0,0.4); /* subtle divider color */
  margin: 0.5rem 0;          /* spacing above and below */
}


/* Responsive */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-toggle {
    display: block;
  }
}
/* === Scroll Reveal Animation System === */

.animate-on-scroll {
  opacity: 0;
  --reveal-transform: translateY(40px);
  transform: var(--reveal-transform);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: transform, opacity;
}

/* Reveal Variants */
.fade-up {
  --reveal-transform: translateY(100px);
}

.fade-down {
  --reveal-transform: translateY(-100px);
}

.fade-left {
  --reveal-transform: translateX(30px);
}

.fade-right {
  --reveal-transform: translateX(-30px);
}

.zoom-in {
  --reveal-transform: scale(0.8);
}

.rotate-in {
  --reveal-transform: rotate(-200deg);
}

.rotate-out {
  --reveal-transform: rotate(240deg);
}

/* Slide */
.slide-up {
  --reveal-transform: translateY(150px);
}

.slide-down {
  --reveal-transform: translateY(-150px);
}

.slide-left {
  --reveal-transform: translateX(30px);
}

.slide-right {
  --reveal-transform: translateX(-30px);
}

/* Pop */
.pop-in {
  --reveal-transform: scale(0.6);
}

/* Bounce */
.bounce-in {
  --reveal-transform: scale(0.7) translateY(20px);
}

/* Skew */
.skew-up {
  --reveal-transform: translateY(30px) skewY(5deg);
}

.skew-left {
  --reveal-transform: translateX(30px) skewX(8deg);
}

/* Flip */
.flip-x {
  --reveal-transform: rotateX(120deg);
  transform-origin: top;
}

.flip-y {
  --reveal-transform: rotateY(25deg);
  transform-origin: left;
}

/* Depth */
.depth-in {
  --reveal-transform: translateZ(-80px);
}

.depth-rotate {
  --reveal-transform: translateZ(-60px) rotateX(10deg);
}

/* End State */
.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/*====== Animation Delay Utilities ==== */
.delay-0   { transition-delay: 0s; }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }
.delay-900 { transition-delay: 0.9s; }
.delay-1000 { transition-delay: 1s; }
.delay-1200 { transition-delay: 1.2s; }
.delay-1500 { transition-delay: 1.5s; }
.delay-1800 { transition-delay: 1.8s; }
.delay-2000 { transition-delay: 2s; }

/* Typewriter*/
#typewriter {
  display: inline-block;
  width: 100%;
  max-width: 26ch;      
  min-height: 1.4em;   
  line-height: 1.1;    
  white-space: nowrap;
  contain: layout;    
}


/* Icons Carousel */
@keyframes stack-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.stack-marquee {
  display: flex;
  width: max-content;
  animation: stack-marquee 30s linear infinite;
  will-change: transform;
}

.stack-marquee > div {
  flex-shrink: 0;
}

.stack-marquee:hover {
  animation-play-state: paused;
}
/* About me section-bg Pattern*/
.bg-pattern-about {
  background-image: url('../images/patterns/egg-shell.png');
  background-repeat: repeat;
  background-size: auto; 
}

/* Skillset Section-bg Pattern*/
.bg-pattern-skillset {
  background-image: url('../images/patterns/ag-square.png');
  background-repeat: repeat;
  background-size: auto;
}

/*Service-Section-background*/
.bg-services-gradient {
  background:  linear-gradient(5deg,  var(--surface), var(--accent));
}
/*Services-section-bg Pattern */
.services-section {
  background-image: url('../images/patterns/egg-shell.png');
  background-repeat: repeat;
  background-size: auto;
} 

/*Portfolio section-bg Pattern*/
.portfolio-section {
  background-image: url('../images/patterns/egg-shell.png');
  background-repeat: repeat;
  background-size: auto;
}

/*Achievement-Section-background Pattern*/
.achievement-section {
  background-image: url('../images/patterns/transparent-square-tiles.png');
  background-repeat: repeat;
  background-size: auto;
} 
 
 /*Contact-Section-background Pattern */
.contact-section {
  background-image: url('../images/patterns/small-crackle-bright.png');
  background-repeat: repeat;
  background-size: auto;
} 
/*Blog-Section-background Pattern*/
.blog-section {
  background-image: url('../images/patterns/transparent-square-tiles.png');
  background-repeat: repeat;
  background-size: auto;
} 
/*Comment-Section-background Pattern */
.comment-section {
  background-image: url('../images/patterns/egg-shell.png');
  background-repeat: repeat;
  background-size: auto;
} 
/* Form inputs and textareas */
input, textarea {
  background-color: var(--surface);       /* dynamic bg based on theme */
  color: var(--primary);                  /* text color */
}

/* Placeholder text */
input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);          /* subtle, visible placeholder */
  opacity: 1;                             /* full opacity */
}
