/* ===============================================
   QUANTUMEDGE — Design System
   Friend's deep-blue/saffron × My dark/light mode
   =============================================== */

/* ----- RESET & BASE ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light theme (default) */
  --clr-bg: #f6f8fc;
  --clr-bg-alt: #eef1f7;
  --clr-surface: #ffffff;
  --clr-surface-hover: #f0f4fe;
  --clr-text: #1a1a2e;
  --clr-text-muted: #4a4a6a;
  --clr-text-inv: #ffffff;
  --clr-accent: #e07000;
  --clr-accent-hover: #c85f00;
  --clr-accent-dim: #ffedd5;
  --clr-border: rgba(0, 0, 0, 0.08);
  --clr-glow: rgba(224, 112, 0, 0.15);
  --clr-nav-bg: rgba(246, 248, 252, 0.85);
  --clr-card-border: rgba(0, 0, 0, 0.06);
  --clr-hero-shade: var(--clr-bg);
  --header-h: 64px;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --max-w: 1120px;
}

[data-theme='dark'] {
  --clr-bg: #08142d;
  --clr-bg-alt: #0a1b3a;
  --clr-surface: #0f2248;
  --clr-surface-hover: #142b58;
  --clr-text: #e8edf5;
  --clr-text-muted: #8899bb;
  --clr-text-inv: #1a1a2e;
  --clr-accent: #ff8a1f;
  --clr-accent-hover: #e07312;
  --clr-accent-dim: rgba(255, 138, 31, 0.12);
  --clr-border: rgba(255, 255, 255, 0.08);
  --clr-glow: rgba(255, 138, 31, 0.12);
  --clr-nav-bg: rgba(8, 20, 45, 0.85);
  --clr-card-border: rgba(255, 255, 255, 0.06);
  --clr-hero-shade: #060f24;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  transition: background 0.35s, color 0.35s;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--clr-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.25s;
}
.skip:focus {
  top: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
  color: inherit;
}

/* ----- CONTAINER ----- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- HEADER ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--clr-nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  transition: background 0.35s, border-color 0.35s;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--clr-accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}

.brand__name span {
  color: var(--clr-text);
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  transition: width 0.25s;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--clr-accent);
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  color: var(--clr-text-muted);
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--clr-accent-dim);
  color: var(--clr-accent);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 28px 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238899bb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 140px;
}

.lang-select:hover {
  border-color: var(--clr-accent);
}

.lang-select:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

[data-theme='dark'] .icon-sun,
[data-theme='light'] .icon-moon {
  display: none;
}

/* ============================
   SECTIONS
   ============================ */

.section {
  padding: 100px 0;
  background: var(--clr-bg);
  transition: background 0.35s;
}

.section--alt {
  background: var(--clr-bg-alt);
}

.section__head {
  text-align: center;
  margin-bottom: 56px;
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-accent);
  margin-bottom: 12px;
  background: var(--clr-accent-dim);
  padding: 4px 14px;
  border-radius: 20px;
}

.section__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 680px;
  margin: 0 auto;
}

.section__desc {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  line-height: 1.7;
}

/* ----- HERO ----- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--clr-hero-shade);
  transition: background 0.35s;
}

[data-theme='dark'] .hero {
  background: linear-gradient(135deg, #060f24 0%, #0a1b3a 50%, #060f24 100%);
}

[data-theme='light'] .hero {
  background: linear-gradient(135deg, #f0f4fe 0%, #fef8f0 50%, #f0f4fe 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--clr-border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.hero__glow {
  position: absolute;
  top: -30%;
  left: -10%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse, var(--clr-glow) 0%, transparent 70%);
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}

.o1 {
  width: 400px;
  height: 400px;
  background: var(--clr-accent);
  top: -10%;
  right: -5%;
  animation: orbFloat 8s ease-in-out infinite alternate;
}

.o2 {
  width: 300px;
  height: 300px;
  background: #2563eb;
  bottom: -5%;
  left: -5%;
  animation: orbFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, -30px) scale(1.15);
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  max-width: 720px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-accent-dim);
  color: var(--clr-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--clr-accent-dim);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero__accent {
  color: var(--clr-accent);
}

.hero__tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-accent);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hero__sub {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--clr-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.25s;
  text-align: center;
  justify-content: center;
}

.btn--primary {
  background: var(--clr-accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--clr-glow);
}

.btn--primary:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--clr-glow);
}

.btn--ghost {
  border: 2px solid var(--clr-border);
  color: var(--clr-text);
}

.btn--ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: var(--clr-accent-dim);
}

/* ----- CARDS ----- */
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: background 0.35s, border-color 0.35s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-accent-dim);
}

.card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--clr-accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 16px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
}

/* ----- GRIDS ----- */
.grid--2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* ----- ABOUT ----- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ----- CAPABILITIES ----- */
.caps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cap__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: background 0.35s, border-color 0.35s, transform 0.3s, box-shadow 0.3s;
}

.cap__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-accent-dim);
}

.cap__icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: block;
}

.cap__card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cap__card p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* ----- STATS ----- */
.stats {
  padding: 64px 0;
  background: var(--clr-accent);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  display: inline;
}

.stat__suf {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  display: inline;
}

.stat__lbl {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}

/* ----- PROJECTS ----- */
.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project__card {
  display: flex;
  background: var(--clr-surface);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background 0.35s, border-color 0.35s, transform 0.3s, box-shadow 0.3s;
}

.project__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-accent-dim);
}

.project__img {
  width: 280px;
  min-height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.project__body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.project__body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.project__body p {
  font-size: 0.92rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* ----- CONTACT ----- */
.contact__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact__email {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-accent);
  margin-bottom: 24px;
}

/* ----- FOOTER ----- */
.footer {
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
  padding: 40px 0;
  transition: background 0.35s, border-color 0.35s;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--clr-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.footer__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.footer__tag {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--clr-accent);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-top: 8px;
}

/* ----- TOAST ----- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--clr-surface);
  color: var(--clr-text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--clr-border);
  opacity: 0;
  transition: all 0.35s;
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----- REVEAL ANIMATION ----- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 940px) {
  .caps__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__grid {
    grid-template-columns: 1fr;
  }
  .project__card {
    flex-direction: column;
  }
  .project__img {
    width: 100%;
    height: 200px;
  }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
  .section__title {
    font-size: 1.7rem;
  }
}

@media (max-width: 720px) {
  .nav__links {
    gap: 16px;
  }
  .nav__links a {
    font-size: 0.8rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .caps__grid {
    grid-template-columns: 1fr;
  }
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 64px 0;
  }
  .card {
    padding: 24px;
  }
  .contact__card {
    padding: 32px 24px;
  }
}

/* ----- SELECTION ----- */
::selection {
  background: var(--clr-accent);
  color: #fff;
}
