/* =========================================
   ROOT
========================================= */

:root {
  --bg: #020617;
  --card: #1e293b;

  --text: #f8fafc;
  --muted: #94a3b8;

  --primary: #22d3ee;
  --primary-dark: #06b6d4;

  --border: rgba(148, 163, 184, 0.16);

  --max-width: 1080px;
}

/* =========================================
   RESET
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;

  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;

  -webkit-text-size-adjust: 100%;

  color-scheme: dark;
}

body {
  font-family: "Inter", sans-serif;

  background:
    radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.12),
      transparent 28%
    ),

    radial-gradient(
      circle at right center,
      rgba(168, 85, 247, 0.12),
      transparent 30%
    ),

    linear-gradient(
      to bottom,
      #020617,
      #0f172a
    );

  background-color: #020617;

  color: var(--text);

  line-height: 1.6;

  overflow-x: hidden;

  position: relative;

  min-height: 100vh;
}

/* =========================================
   GLOBAL TEXT FIX
========================================= */

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
button,
label,
input,
textarea {
  color: var(--text);
}

/* =========================================
   IMAGE
========================================= */

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

/* =========================================
   CONTAINER
========================================= */

.container {
  width: min(var(--max-width), calc(100% - 2rem));

  margin-inline: auto;
}

/* =========================================
   BACKGROUND ORB
========================================= */

.bg-orb {
  position: fixed;

  width: 320px;
  height: 320px;

  border-radius: 999px;

  filter: blur(75px);

  opacity: 0.28;

  z-index: -1;

  animation: float 14s ease-in-out infinite;
}

.orb-1 {
  background: #22d3ee;

  top: -60px;
  left: -70px;
}

.orb-2 {
  background: #a855f7;

  right: -80px;
  top: 38%;

  animation-delay: -4s;
}

/* =========================================
   GLASS
========================================= */

.glass {
  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);

  background: rgba(15, 23, 42, 0.72);

  border: 1px solid var(--border);

  border-radius: 16px;

  padding: 0.7rem 1rem;
}

/* =========================================
   HERO
========================================= */

.hero {
  padding: 1rem 0 5rem;
}

/* =========================================
   NAVBAR
========================================= */

.nav {
  position: sticky;

  top: 1rem;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 1rem;

  z-index: 100;
}

.nav.glass {
  background: rgba(15, 23, 42, 0.82);
}

.logo {
  text-decoration: none;

  color: var(--primary);

  font-weight: 800;

  font-size: 1.4rem;

  letter-spacing: 0.03em;
}

/* =========================================
   MENU
========================================= */

.menu {
  display: flex;

  list-style: none;

  gap: 1.2rem;
}

.menu a {
  text-decoration: none;

  color: var(--text);

  font-weight: 500;

  transition: color 0.25s ease;
}

.menu a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;

  border: 1px solid #334155;

  background: transparent;

  color: var(--text);

  border-radius: 8px;

  font-size: 1.2rem;

  cursor: pointer;
}

/* =========================================
   HERO CONTENT
========================================= */

.hero-content {
  margin-top: 3rem;

  display: grid;

  grid-template-columns: 1.5fr 1fr;

  gap: 2rem;

  align-items: center;
}

.hero-text {
  animation: fadeUp 0.75s ease both;
}

.tag {
  color: var(--primary);

  font-weight: 600;

  margin-bottom: 0.4rem;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);

  line-height: 1.15;

  margin-bottom: 1rem;
}

h1 span {
  color: var(--primary);
}

.lead {
  color: #cbd5e1;

  max-width: 58ch;

  font-size: 1.02rem;
}

/* =========================================
   SECTION
========================================= */

.section {
  padding: 4rem 0;
}

.alt {
  background: rgba(17, 24, 39, 0.58);
}

/* =========================================
   GRID
========================================= */

.grid {
  display: grid;

  gap: 1.2rem;
}

.skills-grid,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* =========================================
   CARD
========================================= */

.card {
  background:
    linear-gradient(
      160deg,
      rgba(30, 41, 59, 0.96),
      rgba(15, 23, 42, 0.9)
    );

  border: 1px solid var(--border);

  border-radius: 16px;

  padding: 1.2rem;

  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-6px);

  box-shadow: 0 14px 32px rgba(8, 47, 73, 0.35);

  border-color: rgba(34, 211, 238, 0.45);
}

/* =========================================
   FIX TEXT INSIDE
========================================= */

.card *,
.glass *,
.menu *,
.nav *,
.hero *,
.section * {
  color: inherit;
}

/* =========================================
   BUTTON
========================================= */

.cta-group {
  margin-top: 1.25rem;

  display: flex;

  gap: 0.8rem;

  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1rem;

  border-radius: 10px;

  text-decoration: none;

  font-weight: 600;

  border: none;

  cursor: pointer;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

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

  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.btn.primary {
  background: var(--primary);

  color: #06202a;
}

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

.btn.ghost {
  border: 1px solid #334155;

  color: var(--text);
}

/* =========================================
   PROJECT
========================================= */

.project-card a {
  color: var(--primary);

  text-decoration: none;

  font-weight: 600;
}

/* =========================================
   CONTACT
========================================= */

.contact {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 1.4rem;

  align-items: start;
}

.contact-form label {
  display: grid;

  gap: 0.35rem;

  margin-bottom: 0.8rem;

  font-weight: 500;
}

/* =========================================
   INPUT
========================================= */

input,
textarea,
button,
select {
  -webkit-appearance: none;
  appearance: none;
}

input,
textarea {
  width: 100%;

  background: #0b1220 !important;

  border: 1px solid #334155;

  border-radius: 10px;

  color: #f8fafc !important;

  padding: 0.7rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;

  border-color: var(--primary);

  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

textarea {
  min-height: 120px;
}

.form-note {
  min-height: 1.3rem;

  margin-top: 0.5rem;

  color: #86efac;

  font-size: 0.95rem;
}

/* =========================================
   FOOTER
========================================= */

.footer {
  text-align: center;

  color: var(--muted);

  padding: 1.6rem;

  border-top: 1px solid #1e293b;
}

/* =========================================
   ANIMATION
========================================= */

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

.js [data-animate] {
  opacity: 0;

  transform: translateY(22px);

  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

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

/* =========================================
   KEYFRAMES
========================================= */

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(28px, -18px) scale(1.07);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

  .hero-content {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

  body {
    font-size: 15px;

    background:
      linear-gradient(
        to bottom,
        #020617,
        #0f172a
      );
  }

  .hero {
    padding: 1rem 0 3rem;
  }

  .nav {
    position: relative;
  }

  .hero-content,
  .skills-grid,
  .project-grid,
  .contact {
    grid-template-columns: 1fr;
  }

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

  .lead {
    margin: auto;

    max-width: 100%;
  }

  .cta-group {
    justify-content: center;
  }

  .btn {
    width: 100%;

    text-align: center;
  }

  .menu-toggle {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0.45rem 0.7rem;
  }

  .menu {
    position: absolute;

    top: 4rem;
    right: 0;

    width: 220px;

    background: rgba(15, 23, 42, 0.98);

    border: 1px solid #334155;

    border-radius: 12px;

    flex-direction: column;

    padding: 1rem;

    gap: 1rem;

    display: none;
  }

  .menu.open {
    display: flex;
  }

  .glass {
    background: rgba(15, 23, 42, 0.9);
  }

  .card {
    background:
      linear-gradient(
        160deg,
        rgba(30, 41, 59, 0.98),
        rgba(15, 23, 42, 0.95)
      );
  }

  .card {
    padding: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .bg-orb {
    width: 180px;
    height: 180px;

    opacity: 0.18;
  }
}

/* =========================================
   REDUCE MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;

    transition: none !important;

    scroll-behavior: auto !important;
  }
}
