/* =====================
   THEME VARIABLES
===================== */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e5e7eb;
  --accent: #6366f1;
  --hero-glow: #eef2ff;
}

html[data-theme="dark"] {
  --bg: #0b0f1a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --card: #111827;
  --border: #1f2933;
  --accent: #818cf8;
  --hero-glow: #1e293b;
}

/* =====================
   BASE
===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  transition: background .4s ease, color .4s ease;
}

.container {
  max-width: 1200px;
  padding: 0 24px;
  margin: auto;
}

section {
  padding: 72px 0;
}

.section-soft {
  padding: 64px 0;
}
/* =====================
   HERO
===================== */
.hero {
  background:
    radial-gradient(
      1000px 500px at 20% 20%,
      var(--hero-glow),
      var(--bg)
    );
}

.hero h1 {
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero p {
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 18px;
}

/* =====================
   BUTTONS
===================== */
.btn {
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all .3s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  border: 1.5px solid var(--text);
  color: var(--text);
}

/* =====================
   PROJECT GRID
===================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 40px;
}

.project-card {
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
  transition: transform .5s ease, box-shadow .5s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,.15);
}

.project-image img {
  width: 100%;
  display: block;
}

.project-info {
  padding: 26px;
}

.project-type {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =====================
   INTRO OVERLAY
===================== */
#intro {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 1s ease forwards;
  animation-delay: 4s;
}

#introText {
  font-size: 42px;
  font-weight: 800;
  transition: opacity .4s;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* =====================
   HEADER
===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

/* =====================
   THEME TOGGLE BUTTON
===================== */
.theme-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 1000;
  transition: transform .3s ease, background .3s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.05);
}

.theme-toggle .sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle .moon {
  display: none;
}
/* ===== Accent ===== */
.accent {
  color: var(--accent);
}

/* ===== Hero polish ===== */
.hero-inner {
  max-width: 720px;
}

.hero h1 {
  line-height: 1.1;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  margin-bottom: 8px;
}


/* ===== Section header ===== */
.section-header h2 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--muted);
  margin-top: 10px;
}

/* ===== Project hover magic ===== */
.project-image {
  overflow: hidden;
}

.project-image img {
  transition: transform .8s ease;
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.35),
    transparent 60%
  );
  opacity: 0;
  transition: opacity .4s ease;
}

.project-card:hover::after {
  opacity: 1;
}

/* ===== ANIMATION SYSTEM ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity .8s ease,
    transform .8s ease;
}

[data-animate].show {
  opacity: 1;
  transform: none;
}

[data-animate="scale-up"] {
  transform: scale(.92);
}

[data-animate="scale-up"].show {
  transform: scale(1);
}
/* ===== HERO GRID ===== */
/* =====================
   HERO GRID
===================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 80px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* =====================
   HERO VISUAL
===================== */
.hero-visual {
  position: relative;
  width: 340px;
  height: 420px;
  margin-left: auto;
  perspective: 1000px;
}

@media (max-width: 900px) {
  .hero-visual {
    margin: 60px auto 0;
  }
}

/* =====================
   IMAGE (BLENDED)
===================== */


.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 3;

  /* 🔥 BLEND EDGES */
  -webkit-mask-image: radial-gradient(
    circle at center,
    black 55%,
    transparent 78%
  );
  mask-image: radial-gradient(
    circle at center,
    black 55%,
    transparent 78%
  );

  transition: transform .2s ease-out;
}

/* =====================
   GLOW
===================== */
.hero-glow {
  position: absolute;
  inset: -100px;
  background: radial-gradient(
    circle,
    rgba(99,102,241,.55),
    transparent 70%
  );
  filter: blur(70px);
  z-index: 1;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,100% { opacity: .4; }
  50% { opacity: .7; }
}

/* =====================
   FLOATING TECH ICONS
===================== */

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}


html[data-theme="dark"] .hero-glow {
  opacity: .55;
}

/* ===== TYPING TEXT ===== */
.typing {
  border-right: 3px solid var(--accent);
  padding-right: 6px;
  white-space: nowrap;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}






.tech-icon {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  animation: float 6s ease-in-out infinite;
}

.tech-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
}

/* positioning */
.flutter { top: 18%; left: -18px; animation-delay: 0s; }
.dart { bottom: 18%; right: -22px; animation-delay: 2s; }
.firebase { top: 60%; left: -22px; animation-delay: 4s; }
/* =====================
   TECH ORBIT SYSTEM
===================== */
.tech-orbit {
  position: absolute;
  width: 360px;
  height: 360px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin 60s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-image-wrap,
  .tech-orbit,
  .hero-glow {
    animation: none;
  }
}

@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}


/* =====================
   TECH ICON BASE
===================== */
.tech-icon {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: auto;
  transition: transform .25s ease;
}

.tech-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* =====================
   ICON POSITIONS (ORBIT)
===================== */
.flutter  { top: 0%;    left: 50%; transform: translateX(-50%); }
.dart     { top: 20%;   right: 0%; }
.firebase { bottom: 20%; right: 0%; }
.sql  { bottom: 0%; left: 50%; transform: translateX(-50%); }
.ios      { bottom: 20%; left: 0%; }
.server     { top: 20%;   left: 0%; }

/* =====================
   TOOLTIP
===================== */
.tech-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: .2s ease;
  pointer-events: none;
}

.tech-icon:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   HOVER FEEL
===================== */
.tech-icon:hover {
  transform: scale(1.15);
}



/* =====================
   DARK MODE FIX
===================== */
html[data-theme="dark"] .tech-icon {
  background: #ffffff;
}



/* =====================
   SKILLS SECTION
==================
   SKILLS
===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 32px;
  /* margin-top: 60px; */
}

.skill-card {
  background: var(--card);
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
  transition: transform .35s ease, box-shadow .35s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,.12);
}

.skill-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(99,102,241,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.skill-icon img {
  width: 28px;
}

/* =====================
   EXPERIENCE
===================== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 30px;
  /* margin-top: 40px; */
}

.experience-box {
  background: var(--card);
  padding: 30px;
  border-radius: 22px;
  text-align: center;
}

.experience-box h3 {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
}

.experience-box p {
  color: var(--muted);
}

/* =====================
   TECH STACK
===================== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  /* margin-top: 40px; */
}

.stack-badge {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(99,102,241,.1);
  color: var(--text);
  font-weight: 500;
  transition: transform .3s ease;
}

.stack-badge:hover {
  transform: translateY(-3px);
}


.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 28px;
  /* margin-top: 40px; */
}

.testimonial-card {
  background: var(--card);
  padding: 22px;
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
}
.skills-section,
.experience-section,
.tech-stack-section {
  padding-bottom: 40px;
}


.testimonial-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.testimonial-card h4 {
  font-size: 14px;
  font-weight: 600;
}


/* =====================
   SECTION DIVIDER
===================== */
.section-soft {
  position: relative;
}

.section-soft::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,.08),
    transparent
  );
}

html[data-theme="light"] .section-soft::before {
  background: linear-gradient(
    to right,
    transparent,
    rgba(0,0,0,.08),
    transparent
  );
}
/* =====================
   SECTION DIVIDER
===================== */
.section-soft {
  position: relative;
}

.section-soft::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,.08),
    transparent
  );
}

html[data-theme="light"] .section-soft::before {
  background: linear-gradient(
    to right,
    transparent,
    rgba(0,0,0,.08),
    transparent
  );
}
/* =====================
   SCROLL ANIMATIONS
===================== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: all .8s cubic-bezier(.2,.8,.2,1);
}

[data-animate].active {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="scale-up"] {
  transform: scale(.92);
}

[data-animate="scale-up"].active {
  transform: scale(1);
}




/* =====================
   MOBILE OPTIMIZATION
===================== */
@media (max-width: 768px) {

  section {
    padding: 56px 0;
  }

  .section-soft {
    padding: 48px 0;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .section-header p {
    font-size: 15px;
  }

  .skills-grid,
  .experience-grid,
  .testimonials-grid {
    gap: 20px;
  }

  .hero-grid {
    gap: 40px;
  }

}



/* =====================
   TYPOGRAPHY SCALE
===================== */
h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

p {
  font-size: 16px;
  line-height: 1.7;
}

.hero p {
  font-size: 18px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .5s ease, box-shadow .5s ease;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

/* Image */
.project-media {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
}

.project-card:hover img {
  transform: scale(1.12);
}

/* Gradient overlay */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.75),
    rgba(0,0,0,.1),
    transparent
  );
}

/* Content */
.project-content {
  padding: 18px 20px 22px;
}

.project-type {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  margin-bottom: 10px;
}

.project-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.project-link {
  font-size: 13px;
  opacity: .7;
  transition: opacity .3s ease;
}

.project-card:hover .project-link {
  opacity: 1;
}


.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,.12),
    transparent
  );
  transform: translateX(-100%);
  transition: transform .8s ease;
}

.project-card:hover::after {
  transform: translateX(100%);
}


@media (max-width: 600px) {
  .project-media {
    height: 190px;
  }

  .project-content h3 {
    font-size: 1rem;
  }
}
