/* ============================================
   PORTFOLIO - Anesu David Pasipanodya
   Color scheme: orange / black / grey / white
   ============================================ */

:root {
  --orange:      #F97316;
  --orange-dark: #C2410C;
  --black:       #1F2937;
  --grey-dark:   #374151;
  --grey:        #6B7280;
  --grey-mid:    #9CA3AF;
  --grey-light:  #E5E7EB;
  --grey-bg:     #F3F4F6;
  --grey-subtle: #F9FAFB;
  --white:       #FFFFFF;
  --radius:      10px;
  --shadow:      0 2px 16px rgba(0,0,0,0.07);
  --shadow-md:   0 6px 28px rgba(0,0,0,0.10);
  --transition:  0.25s ease;
}

/* ── DARK MODE OVERRIDES ─────────────────── */
[data-theme="dark"] {
  --black:      #F9FAFB;
  --grey-dark:  #D1D5DB;
  --grey:       #9CA3AF;
  --grey-mid:   #6B7280;
  --grey-light: #374151;
  --grey-bg:    #1F2937;
  --grey-subtle:#111827;
  --white:      #0F172A;
}

[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(249,115,22,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(249,115,22,0.08) 0%, transparent 60%),
    linear-gradient(135deg, #1e293b 0%, #0f172a 45%, #1a120a 100%);
}

[data-theme="dark"] .navbar {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .navbar__links {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .chart-card {
  background: #1e293b;
  border-color: #374151;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #1e293b;
  border-color: #374151;
  color: #F9FAFB;
}

[data-theme="dark"] footer {
  background: #0a0f1a;
}

[data-theme="dark"] .filter-btn {
  background: #1e293b;
  border-color: #374151;
  color: #9CA3AF;
}

[data-theme="dark"] .social-icon {
  background: #1e293b;
  border-color: #374151;
  color: #9CA3AF;
}

/* ── THEME TOGGLE BUTTON ─────────────────── */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--grey-light);
  background: var(--white);
  color: var(--grey-dark);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }

img { max-width: 100%; display: block; }

/* ── NAVBAR ──────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--grey-light);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.navbar__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.5px;
}

.navbar__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar__links a {
  color: var(--grey-dark);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active { color: var(--orange); }

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.navbar__toggle span {
  width: 24px; height: 2px;
  background: var(--grey-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ────────────────────────────────── */
.hero {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(249,115,22,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(249,115,22,0.06) 0%, transparent 60%),
    linear-gradient(135deg, #f3f4f6 0%, #ffffff 45%, #fff7ed 100%);
  display: flex;
  align-items: center;
  padding: 80px 5% 60px;
  gap: 5%;
  border-bottom: 1px solid var(--grey-light);
  position: relative;
  overflow: hidden;
}

/* decorative blurred orb behind photo */
.hero::after {
  content: '';
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__text { flex: 1; position: relative; z-index: 1; }
.hero__image { position: relative; z-index: 1; }

.hero__text { flex: 1; }

.hero__greeting {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.2);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero__name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__name span { color: var(--orange); }

.hero__title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--grey);
  margin-bottom: 1.5rem;
  min-height: 2em;
  font-weight: 500;
}

.hero__bio {
  color: var(--grey-dark);
  max-width: 520px;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
}
.btn--primary:hover { background: var(--orange-dark); color: var(--white); }

.btn--outline {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
}
.btn--outline:hover { background: var(--orange); color: var(--white); }

.hero__image {
  flex: 0 0 340px;
  display: flex;
  justify-content: center;
}

.hero__image a {
  display: block;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--orange), var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
}

.hero__image a:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--orange), 0 8px 32px rgba(249,115,22,0.25);
}

.hero__image img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--white);
  display: block;
  transition: transform var(--transition);
}

.hero__image a:hover img {
  transform: scale(1.06);
}

.hero__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.social-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--grey-light);
  color: var(--grey);
  font-size: 1rem;
  transition: all var(--transition);
  background: var(--white);
}

.social-icon:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(249,115,22,0.06);
  transform: translateY(-2px);
}

/* ── SECTIONS ────────────────────────────── */
section { padding: 80px 5%; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--black);
}

.section-title h2 span { color: var(--orange); }

.section-title p {
  color: var(--grey);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.divider {
  width: 48px; height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* ── ABOUT ───────────────────────────────── */
#about { background: var(--grey-subtle); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.about__image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}

.about__content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.about__content p {
  color: var(--grey-dark);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(249,115,22,0.1);
  color: var(--orange-dark);
  border: 1px solid rgba(249,115,22,0.25);
}

/* ── SKILLS / CHARTS ─────────────────────── */
#skills { background: var(--white); }

.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--grey-light);
  padding-bottom: 0.75rem;
}

.chart-card h3 span {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--orange);
  border-radius: 50%;
  margin-right: 0.5rem;
}

/* ── TOOLS GRID ──────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.4rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--grey-light);
  background: var(--grey-subtle);
  cursor: default;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.tool-item:hover {
  border-color: var(--orange);
  background: rgba(249,115,22,0.05);
  transform: translateY(-2px);
}

.tool-item i {
  font-size: 1.4rem;
  color: var(--orange);
}

.tool-item span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--grey-dark);
  text-align: center;
  line-height: 1.2;
}

[data-theme="dark"] .tool-item {
  background: #1e293b;
  border-color: #374151;
}

[data-theme="dark"] .tool-item:hover {
  background: rgba(249,115,22,0.08);
}

/* ── GITHUB PROJECTS ─────────────────────── */
#projects { background: var(--grey-bg); }

.projects__filter {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--grey-light);
  background: var(--white);
  color: var(--grey);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(249,115,22,0.05);
}

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

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey-light);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
}

.project-card__fork-icon { color: var(--grey); font-size: 0.85rem; }

.project-card__desc {
  font-size: 0.88rem;
  color: var(--grey);
  flex: 1;
  line-height: 1.5;
}

.project-card__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--grey);
}

.project-card__lang::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 0.3rem;
  background: var(--orange);
  vertical-align: middle;
}

.project-card__link {
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── FEATURED PROJECT ────────────────────── */
.featured-project {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(249,115,22,0.12);
  overflow: hidden;
}

.featured-project__badge {
  background: var(--orange);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.featured-project__body {
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.featured-project__name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 0.6rem;
}

.featured-project__desc {
  font-size: 0.9rem;
  color: var(--grey);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.featured-project__links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
}

.featured-project__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

[data-theme="dark"] .featured-project {
  background: #1e293b;
}

.projects__loading,
.projects__error {
  text-align: center;
  color: var(--grey);
  padding: 3rem;
  font-size: 0.95rem;
}

.projects__error { color: #ef4444; }

/* ── CONTACT ─────────────────────────────── */
#contact { background: var(--grey-bg); }

#contact .section-title h2 { color: var(--black); }
#contact .section-title p { color: var(--grey); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 860px;
  margin: 0 auto;
}

.contact__info h3 {
  color: var(--black);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

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

.contact__detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--grey-dark);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.contact__detail i {
  color: var(--orange);
  width: 18px;
  text-align: center;
}

.contact__detail--link {
  color: var(--grey-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.contact__detail--link:hover {
  color: var(--orange);
}

.contact__detail--whatsapp { color: #25D366; }
.contact__detail--whatsapp:hover { color: #1ebe5d; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grey-dark);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--grey-light);
  background: var(--white);
  color: var(--black);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-status {
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.success { display: block; background: rgba(34,197,94,0.1); color: #22c55e; }
.form-status.error   { display: block; background: rgba(239,68,68,0.1);  color: #ef4444; }

/* ── FOOTER ──────────────────────────────── */
footer {
  background: var(--grey-dark);
  color: var(--grey-mid);
  text-align: center;
  padding: 1.5rem 5%;
  font-size: 0.82rem;
}

footer span { color: var(--orange); }

/* ── SCROLL-TO-TOP ───────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(249,115,22,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 99;
}

.scroll-top.visible { opacity: 1; pointer-events: auto; }

/* ── LOADER ──────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--grey-light) 25%, #f0f0f0 50%, var(--grey-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .navbar__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--grey-light); padding: 1rem 5%; gap: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
  .navbar__links.open { display: flex; }
  .navbar__toggle { display: flex; }

  .hero { flex-direction: column-reverse; text-align: center; padding-top: 100px; }
  .hero__image { flex: unset; }
  .hero__image img { width: 200px; height: 200px; }
  .hero__cta { justify-content: center; }
  .hero__socials { justify-content: center; }

  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
