/* =====================
   THEME VARIABLES
===================== */
:root {
  --bg-dark: #0b0215;
  --bg-purple: #240046;
  --bg-accent: #5a189a;
  --accent: #ff2fb2;
  --accent-2: #9d4edd;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --text-muted-dark: #555;
  --text-muted-light: #cfc4e0;
  --card-dark: #140025;

  /* Font sizes - Desktop */
  --font-hero-h1: 64px;
  --font-hero-p: 20px;
  --font-section-h2: 42px;
  --font-section-p: 18px;
  --font-body: 16px;

  /* Line heights */
  --line-height-tight: 1.1;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
}

/* =====================
   RESET
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =====================
   GLOBAL TRANSITIONS
===================== */
html {
  overflow-x: hidden; /* kill horizontal scroll at root level */
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-size: var(--font-body);
  line-height: var(--line-height-normal);
  transition: background-color 0.6s ease, color 0.6s ease;
  overflow-x: hidden;
  max-width: 100%;
  will-change: background-color;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.section,
footer,
.project-card,
.testimonial,
.skills li {
  transition:
    background-color 0.6s ease,
    color 0.6s ease,
    box-shadow 0.6s ease;
}

/* =====================
   WHITE BACKGROUND PAGE
===================== */
body.white-bg {
  background-color: #ffffff;
  color: var(--text-dark);
}

body.white-bg .section {
  background-color: #ffffff;
}

body.white-bg p,
body.white-bg span,
body.white-bg li {
  color: var(--text-muted-dark);
}

body.white-bg h2,
body.white-bg h3 {
  color: var(--text-dark);
}

body.white-bg .project-card,
body.white-bg .testimonial,
body.white-bg .skills li {
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body.white-bg header {
  background-color: var(--bg-dark);
}

body.white-bg nav a {
  color: var(--text-muted-light);
}

body.white-bg nav a:hover {
  color: white;
}

body.white-bg footer {
  background-color: #ffffff;
  color: var(--text-dark);
}

body.white-bg footer p {
  color: var(--text-muted-dark);
}

/* =====================
   LIGHT MODE (SCROLLED)
===================== */
body.scrolled {
  background-color: #ffffff;
  color: var(--text-dark);
}

body.scrolled .section,
body.scrolled footer {
  background-color: #ffffff;
}

body.scrolled p,
body.scrolled span,
body.scrolled li {
  color: var(--text-muted-dark);
}

body.scrolled h2,
body.scrolled h3 {
  color: var(--text-dark);
}

body.scrolled .project-card,
body.scrolled .testimonial,
body.scrolled .skills li {
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =====================
   HEADER
===================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  transition: padding 0.3s ease;
  flex-wrap: nowrap;        /* ← was wrap, causing nav to drop to second row */
  font-family: 'Poppins', sans-serif;
  gap: 12px;
}

/* =====================
   LOGO
===================== */
.logo {
  width: clamp(70px, 10vw, 110px);
  height: auto;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  transition: width 0.3s ease;
}

body.scrolled .logo {
  width: clamp(50px, 8vw, 90px);
}

body.scrolled header {
  padding: 8px 24px;
  background-color: #ffffff;
}

/* nav + language button wrapper */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language button */
.lang-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  transition: 0.2s ease;
}

.lang-btn:hover {
  background: var(--accent);
  color: white;
}

a.lang-btn {
  text-decoration: none;
}

/* Navigation */
nav a {
  color: var(--text-muted-light);
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
}

nav a:hover {
  color: white;
  transform: translateY(-2px);
}

/* =====================
   HERO
===================== */
.hero {
  padding: 100px 64px;
  background: radial-gradient(circle at top left, var(--bg-accent), var(--bg-purple) 60%);
  color: white;
  min-height: 75vh;
  overflow: hidden; /* restore this */
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden; /* restore this */
}

.hero-content {
  overflow: hidden; /* restore this */
  width: 100%;
}



.hero h1 {
  font-size: clamp(30px, 3.2vw, 64px); /* ← reduced from 34px/4.2vw */
  line-height: 1.1;
  margin-bottom: 28px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.hero p {
  font-size: 20px;
  color: var(--text-muted-light);
  margin-bottom: 18px;
  line-height: 1.7;
  max-width: 100%;           /* was 850px — caused overflow on mobile */
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Hero photo — float right on desktop */
.hero-photo {
    float: right;
  max-width: 35%; /* ← reduced from 40% */
  margin: 40px 10px 24px 40px;
}

.photo-circle {
  width: clamp(180px, 20vw, 280px); /* ← reduced from 220px/24vw/320px */
  height: clamp(180px, 20vw, 280px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow:
    0 0 0 8px rgba(255, 47, 178, 0.15),
    0 0 40px rgba(255, 47, 178, 0.3),
    0 20px 60px rgba(0,0,0,0.4);
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  display: block;
}

/* =====================
   SECTIONS
===================== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 90px 64px;
}

.section h2 {
  font-size: 42px;
  margin-bottom: 28px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

.section h3 {
  font-size: 24px;
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.5;
}

.section p {
  max-width: 750px;
  color: var(--text-muted-light);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* About Me override */
#about-me p {
  max-width: 100%;
  text-align: left;
}

/* =====================
   BUTTONS
===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 14px 30px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  min-width: 160px;
  transition: all 0.3s ease;
  vertical-align: middle;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* =====================
   SKILLS
===================== */
.skills {
  margin-top: 24px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.skills li {
  background-color: var(--card-dark);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
}

/* =====================
   PROJECTS
===================== */
.project-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card {
  position: relative;
  padding: 3px;
  border-radius: 14px;
  background: #ffffff;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    transparent,
    transparent,
    var(--accent),
    var(--accent-2),
    var(--bg-accent),
    transparent,
    transparent,
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-inner {
  position: relative;
  background: #ffffff;
  border-radius: 11px;
  padding: 20px;
  color: var(--text-dark);
  z-index: 1;
}

.project-title {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

.project-title::before {
  content: "✨";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-4px);
  }
  .project-card:hover::before {
    opacity: 1;
    animation: snakeBorder 3s linear infinite;
  }
}

@media (hover: none) {
  .project-card::before {
    opacity: 1;
    animation: snakeBorder 3s linear infinite;
  }
  .project-card:active {
    transform: translateY(-4px);
  }
}

@keyframes snakeBorder {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================
   TESTIMONIALS
===================== */
.testimonial-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.testimonial {
  background-color: var(--card-dark);
  padding: 22px;
  border-radius: 14px;
}

.testimonial span {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted-light);
}

/* =====================
   FOOTER
===================== */
footer {
  background-color: #07000f;
  text-align: center;
  padding: 40px 20px;
}

footer p {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted-light);
}

footer a.btn-primary {
  display: inline-block;
  margin: 20px auto;
}

footer.contact {
  text-align: center;
  padding: 40px 20px;
}

footer.contact a.btn-primary {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 20px 6px !important;
}

footer.contact p {
  margin: 10px 0;
}

/* =====================
   ARROW WIDGET
===================== */
.arrow-container {
  text-align: left;
  margin: 20px 0;
}

.arrow-container p {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-left: 10px;
  animation: bounceInner 2s ease-in-out infinite;
}

.arrow::before,
.arrow::after {
  content: '';
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: ringPulse 2s ease-in-out infinite;
}

.arrow::before {
  width: 40px;
  height: 40px;
}

.arrow::after {
  width: 50px;
  height: 50px;
  animation-delay: 0.5s;
}

.arrow span {
  width: 6px;
  height: 20px;
  background: var(--accent);
  position: relative;
  display: block;
  z-index: 1;
  border-radius: 3px 3px 0 0;
}

.arrow span::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--accent);
}

@keyframes ringPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(1.2); }
}

@keyframes bounceInner {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* =====================
   ARROW right
===================== */
.arrow--right {
  animation: bounceInner-right 2s ease-in-out infinite;
}

.arrow--right span {
  width: 20px;
  height: 6px;
  border-radius: 3px 0 0 3px;
}

.arrow--right span::after {
  right: -9px;
  bottom: auto;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  border-left: 12px solid var(--accent);
  border-right: none;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

@keyframes bounceInner-right {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(6px); }
}

/* =====================
   FADE-IN
===================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   CARD HOVER GLOW
===================== */
.project-card,
.testimonial,
.skills li {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.testimonial:hover,
.skills li:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(157,78,221,0.25),
    0 20px 50px rgba(157,78,221,0.35);
}

/* ========================================
   HOURS SAVED WIDGET
======================================== */
.hours-saved-widget {
  margin: 30px 0;
  max-width: 380px;
  width: fit-content;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  padding: 20px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(255, 47, 178, 0.35);
  animation: pulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.hours-saved-widget::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(255,255,255,0.1), transparent);
  animation: rotate 4s linear infinite;
}

.counter-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  color: white;
  position: relative;
  z-index: 1;
}

.counter-icon {
  font-size: 2.5rem;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
  flex-shrink: 0;
}

.counter-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.counter-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.counter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.95;
  margin-top: 5px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 30px rgba(255, 47, 178, 0.35);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 47, 178, 0.5);
  }
}

@keyframes rotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================
   NOTE BOX
===================== */
.note-box {
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.note-box strong {
  color: #ffc107;
}

/* =====================
   RESPONSIVE
===================== */

/* Laptop */
@media (max-width: 1024px) {
  .hero h1    { font-size: 54px; }
  .hero p     { font-size: 19px; }
  .section h2 { font-size: 38px; }
  .section p  { font-size: 17px; }
}

/* Tablet — switch hero to stacked layout */
@media (max-width: 768px) {
  header { padding: 14px 16px; }

  .hero {
    padding: 50px 24px;
    min-height: auto;
  }

  .section { padding: 50px 24px; }

  /* Keep float layout but shrink the photo */
.hero-photo {
  float: right;
  max-width: 35%;
   margin: 40px 14px 24px 40px;/* ← 12px right margin keeps it off the edge */
}

  .photo-circle {
 width: clamp(180px, 20vw, 280px); /* ← reduced from 220px/24vw/320px */
  height: clamp(180px, 20vw, 280px);
  }

  .hero h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 12px;
    max-width: 100%;
  }

  .section h2    { font-size: 30px; margin-bottom: 20px; }
  .section p     { font-size: 16px; }
  #about-me p    { font-size: 16px; }

  .nav-wrapper {
    flex-wrap: nowrap;
    gap: 8px;
  }

  nav {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  nav a {
    font-size: 11px;
    margin: 0;
    white-space: nowrap;
  }

  .lang-btn { font-size: 11px; padding: 4px 8px; }

  .project-grid,
  .testimonial-grid,
  .skills {
    grid-template-columns: 1fr;
  }

  .hours-saved-widget {
    padding: 16px 20px;
    margin: 20px 0;
    max-width: 100%;
    width: 100%;
  }

  .counter-number { font-size: 2rem; }
  .counter-icon   { font-size: 2rem; }
  .counter-label  { font-size: 0.65rem; }
}

/* Mobile ≤480px */
@media (max-width: 480px) {
  body { font-size: 15px; }

  .hero {
    padding: 40px 20px;
    min-height: auto;
  }

  .section { padding: 40px 20px; }
 @media (max-width: 480px) {
.hero-photo {
    float: none !important;
    max-width: 100% !important;
    margin: 0 auto 24px auto !important;
    display: flex !important;
    justify-content: center;
    padding-top: 12px;
  }
}
  .hero h1 {
    font-size: 24px !important;
    margin-bottom: 18px;
    line-height: 1.2;
  }

  .hero p        { font-size: 16px !important; margin-bottom: 14px; }
  .section h2    { font-size: 30px !important; margin-bottom: 20px; }
  .section h3    { font-size: 20px; margin-bottom: 12px; }
  .section p     { font-size: 16px !important; }
  #about-me p    { font-size: 16px !important; line-height: 1.6; }
  .testimonial p { font-size: 15px !important; }

  .photo-circle {
    width: 130px;
    height: 130px;
  }

  .hours-saved-widget {
    padding: 16px 20px;
    margin: 20px 0;
    max-width: 100%;
    width: 100%;
  }

  .counter-container { gap: 12px; }
  .counter-number    { font-size: 2rem; }
  .counter-icon      { font-size: 2rem; }
  .counter-label     { font-size: 0.65rem; }

  .btn-primary { padding: 12px 24px; font-size: 16px; }
}

/* Mobile ≤375px */
@media (max-width: 375px) {
  .hero    { padding: 36px 18px; }
  .section { padding: 36px 18px; }

  .hero h1    { font-size: 30px !important; }
  .hero p     { font-size: 15px !important; }
  .section h2 { font-size: 28px !important; }
  .section p  { font-size: 15px !important; }

  .photo-circle { width: 110px; height: 110px; }

  .hours-saved-widget { padding: 14px 18px; margin: 18px 0; }
  .counter-number     { font-size: 1.8rem; }
  .counter-icon       { font-size: 1.8rem; }
  .counter-label      { font-size: 0.6rem; }
}

/* Mobile ≤320px */
@media (max-width: 320px) {
  .hero    { padding: 32px 16px; }
  .section { padding: 32px 16px; }

  .hero h1    { font-size: 26px !important; }
  .hero p     { font-size: 14px !important; }
  .section h2 { font-size: 24px !important; }
  .section p  { font-size: 14px !important; }

  .photo-circle { width: 100px; height: 100px; }

  .hours-saved-widget { padding: 12px 15px; }

  .counter-container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    align-items: center;
  }

  .counter-content { align-items: center; }
  .counter-number  { font-size: 1.6rem; }
  .counter-icon    { font-size: 1.6rem; }
  .counter-label   { font-size: 0.55rem; text-align: center; }
}
ul {
  color: var(--text-muted-light);
}
