/* =========================================================
   File: style/main.css
   Theme-ready, responsive, clean component styles
   ========================================================= */

/* ============================
   Design Tokens (Light)
   ============================ */

:root {
  /* Accent palette (Light: green + orange) */
  --color-primary: rgb(46, 194, 179);
  /* green */
  --color-primary-soft: rgba(46, 194, 179, 0.12);
  --color-secondary: rgb(253, 167, 133);
  /* orange */
  --color-secondary-soft: rgba(253, 167, 133, 0.18);

  /* Dark-friendly tertiary */
  --color-tertiary: rgb(54, 55, 85);

  /* Neutrals */
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f2f8;
  --color-text-main: #1f2933;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;

  /* Effects */
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 35px rgba(15, 23, 42, 0.12);

  /* Radius / spacing */
  --radius: 0.9rem;
  --radius-sm: 0.65rem;
  --radius-pill: 999px;
  --transition: all 0.25s ease;
}

/* ============================
   Dark Theme Overrides
   ============================ */

html[data-theme="dark"] {
  /* Accent palette (Dark: deep purple base + accents) */
  --color-primary: rgb(163, 139, 255);
  /* purple accent */
  --color-primary-soft: rgba(163, 139, 255, 0.14);

  --color-secondary: rgb(253, 167, 133);
  /* keep orange as highlight */
  --color-secondary-soft: rgba(253, 167, 133, 0.14);

  --color-tertiary: rgb(227, 229, 255);
  /* light text heading */

  /* Neutrals */
  --color-bg: #0e0b16;
  /* deep purple-black */
  --color-surface: #161125;
  --color-surface-alt: #1d1732;
  --color-text-main: #f1f5f9;
  --color-text-muted: rgba(241, 245, 249, 0.72);
  --color-border: rgba(241, 245, 249, 0.10);

  /* Effects */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* ============================
   Reset / Base
   ============================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography helpers */

.hero-title {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700;
  color: var(--color-tertiary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: var(--color-tertiary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 34rem;
  margin: 0.25rem auto 1.75rem;
}

.hero-tagline {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.hero-copy {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 38rem;
  margin: 0.5rem auto;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

/* ============================
   Navigation
   ============================ */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

html[data-theme="dark"] .nav-sticky {
  background-color: rgba(14, 11, 22, 0.78);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-tertiary);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.nav-links {
  display: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: width 0.22s ease;
}

.nav-link:hover {
  color: var(--color-tertiary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-tertiary);
  font-weight: 600;
}

/* Mobile nav */

.mobile-menu-btn {
  display: inline-flex;
  padding: 0.4rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hamburger {
  width: 1.3rem;
  height: 2px;
  background-color: var(--color-tertiary);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 1.3rem;
  height: 2px;
  background-color: var(--color-tertiary);
  transition: var(--transition);
}

.hamburger::before {
  top: -5px;
}

.hamburger::after {
  top: 5px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu.show {
  display: flex;
}

.mobile-nav-link {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--color-text-main);
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--color-primary-soft);
  color: var(--color-tertiary);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-menu {
    display: none !important;
  }
}

/* ============================
   Hero Section
   ============================ */

.hero-section {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(circle at top left, var(--color-primary-soft), transparent 55%),
    radial-gradient(circle at bottom right, var(--color-secondary-soft), transparent 55%),
    var(--color-bg);
}

.hero-content-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* ============================
   Buttons
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(46, 194, 179, 0.30);
}

html[data-theme="dark"] .btn-primary {
  box-shadow: 0 10px 24px rgba(163, 139, 255, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #1c1b22;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-tertiary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-soft);
}

.btn-full {
  width: 100%;
}

/* ============================
   Dropdown selection
   ============================ */

select {
  font-family: inherit;
  color: var(--color-primary-soft);
  border: 1px solid var(--color-primary);
  padding: 8px 12px;
}

/* Selected option */
select option:checked {
  background-color: var(--color-primary) !important;
  color: var(--color-surface-alt);
}

/* Hovered option (some browsers only) */
select option:hover {
  background-color: var(--color-primary-soft);
  color: var(--color-surface-alt);
}

/* ============================
   Projects / Cards Grid
   ============================ */

.projects-section {
  padding: 3rem 0 4rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.project-card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(46, 194, 179, 0.25);
}

html[data-theme="dark"] .project-card:hover {
  border-color: rgba(163, 139, 255, 0.30);
}

.project-content {
  padding: 1.25rem 1.35rem 1.2rem;
}

.project-content h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--color-tertiary);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.project-content p {
  font-size: 0.94rem;
  color: var(--color-text-muted);
  margin-bottom: 0.85rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tools-used {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.76rem;
  padding: 0.22rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-secondary-soft);
  color: var(--color-tertiary);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .tag {
  border-color: rgba(241, 245, 249, 0.08);
}

/* Link wrapper for cards */
.card-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link-wrapper:hover .project-card {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Empty state */
.hidden {
  display: none !important;
}

#noProjects,
#noSkills,
#noTools {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 1.5rem 0;
}

/* ============================
   Filter Buttons
   ============================ */

.filter-section {
  padding: 1rem 0 0.5rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.filter-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  padding: 0.42rem 1.1rem;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-tertiary);
  background-color: var(--color-primary-soft);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #ffffff;
  border-color: transparent;
}

/* ============================
   Articles filters (selects)
   ============================ */

.article-filters {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.article-filters select {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-main);
  min-width: 150px;
}

.article-filters select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* ============================
   Forms (Contact / Newsletter)
   ============================ */

.contact-section {
  padding: 3rem 0 4rem;
}

.form-card {
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 1.75rem 1.8rem 1.9rem;
  box-shadow: var(--shadow-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-tertiary);
}

input,
select,
textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-main);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

/* Notification banner (in-form) */
.notification {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.notification--success {
  background-color: rgba(46, 194, 179, 0.10);
  border-color: rgba(46, 194, 179, 0.55);
  color: #0b5b49;
}

.notification--error {
  background-color: rgba(253, 167, 133, 0.12);
  border-color: rgba(253, 167, 133, 0.7);
  color: #7c2d12;
}

.notification--info {
  background: rgba(99, 102, 241, 0.10);
  color: var(--color-tertiary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ============================
   Skills (Cloud Box)
   ============================ */

/* A clean "box" container you asked for */
.skills-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: calc(var(--radius*0.8) + 0.0rem);
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
}

.skills-box-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skills-box-header h2,
.skills-box-header h3 {
  margin: 0;
  color: var(--color-tertiary-soft);
}

.skills-box-header p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 44rem;
}

/* The chip cloud */
.cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 12px;
}

.skill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;

  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  border: 1px solid var(--color-tertiary-soft);
  background: linear-gradient(135deg,
      var(--color-primary-soft),
      var(--color-secondary-soft));
  color: var(--color-text-main);

  transition: transform .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
}


html[data-theme="dark"] .skill {
  border-color: var(--color-tertiary-soft);
  background: linear-gradient(135deg,
      var(--color-primary-soft),
      var(--color-secondary-soft));
}

.skill.tiny {
  transform: scale(0.80);
  opacity: 0.80;
}

.skill.small {
  transform: scale(0.85);
  opacity: 0.85;
}

.skill.medium {
  transform: scale(0.90);
  opacity: 0.90;
}

.skill.large {
  transform: scale(0.95);
  opacity: 0.95;
}

.skill.huge {
  transform: scale(1.00);
  opacity: 1.00;
}

/* Base hover */
.skill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .skill:hover {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
}

/* Highlight states driven by JS */
.skill--active {
  background: linear-gradient(135deg,
      var(--color-primary-soft),
      var(--color-secondary-soft));
  border-color: var(--color-tertiary);
  color: var(--color-tertiary);
}

html[data-theme="dark"] .skill--active {
  background: linear-gradient(135deg,
      var(--color-primary-soft),
      var(--color-secondary-soft));
  border-color: var(--color-primary-soft);
}

.skill--related {
  background: rgba(46, 194, 179, 0.07);
  border-color: var(--color-secondary-soft);
  color: var(--color-secondary);
}

html[data-theme="dark"] .skill--related {
  background: linear-gradient(135deg,
      var(--color-primary-soft),
      var(--color-secondary-soft));
  border-color: var(--color-primary-soft);
}


.skill.dimmed {
  opacity: 0.18;
  filter: grayscale(1);
}

.skill.highlighted {
  opacity: 1;
  transform: scale(1.18) !important;
  border-color: var(--color-primary);
  box-shadow: 0 10px 20px var(--color-primary-soft);
}



/* ============================
   Promobox / CTA
   ============================ */

.promobox-wrap .inner-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) + 0.35rem);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.promobox-wrap .title {
  color: var(--color-tertiary);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pt-5 {
  padding-top: 1.25rem;
}

.mb-0 {
  margin-bottom: 0;
}

/* ============================
   Footer
   ============================ */

.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface-alt);
  padding: 1.2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-col h4 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-left p {
  margin: 0.3rem 0;
  color: var(--color-secondary);
}

.footer-middle ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-middle li {
  margin-bottom: 0.5rem;
}

.footer-middle a {
  color: var(--color-secondary);
  text-decoration: none;
}

.footer-middle a:hover {
  color: var(--color-teriary);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
}

.social-icons a {
  color: var(--color-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: var(--color-tertiary);
  transform: translateY(-2px);
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* space between title and icons */
}


/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}

/* ============================
   Responsive Layout
   ============================ */

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 3.75rem 0 3rem;
  }
}

/* ============================
   Animation Utility Classes
   (JS controls opacity/transform)
   ============================ */

.animate-fade-in,
.animate-slide-up,
.animate-scale-in {
  will-change: transform, opacity;
}