/* ============================================
   ALEX.DEV — Portfolio CSS
   Aesthetic: Dark editorial with electric accent
   ============================================ */

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

:root {
  --bg: #0a0a0f;
  --bg-card: #13131a;
  --bg-card2: #1a1a24;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #f0f0f8;
  --text-muted: #888899;
  --text-soft: #b0b0c8;
  --border: rgba(108,99,255,0.18);
  --border-light: rgba(255,255,255,0.06);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

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

/* CONTAINER */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 32px rgba(108,99,255,0.35);
}
.btn--primary:hover {
  background: #7c74ff;
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(108,99,255,0.55);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn--full { width: 100%; justify-content: center; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(10,10,15,0.9);
  border-bottom-color: var(--border-light);
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--accent); }
.nav__links {
  display: flex;
  list-style: none;
  gap: 36px;
}
.nav__links a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav__links a:hover { color: var(--accent); }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 999;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.4rem; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 100px 60px 60px;
  position: relative;
  overflow: hidden;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero__content {
  flex: 1;
  max-width: 580px;
  position: relative;
  z-index: 2;
}

.hero__greeting {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.hero__role {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text-soft);
  margin-bottom: 24px;
  min-height: 2.5rem;
}
.hero__role span {
  color: var(--accent2);
  font-weight: 700;
  border-right: 3px solid var(--accent2);
  padding-right: 3px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }

.hero__bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 460px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero__socials {
  display: flex;
  gap: 16px;
}
.hero__socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.hero__socials a svg { width: 18px; height: 18px; }
.hero__socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* Avatar */
.hero__visual {
  flex-shrink: 0;
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__avatar {
  position: relative;
  width: 220px;
  height: 220px;
}
.hero__avatar-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: rotate 8s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.hero__avatar-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-card));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.05em;
}
.hero__float {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}
.hero__float--1 { top: 20px; right: 0; animation-delay: 0s; }
.hero__float--2 { bottom: 80px; left: -20px; animation-delay: 1s; }
.hero__float--3 { bottom: 30px; right: 0; animation-delay: 2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 24px 60px;
  }
  .hero__content { max-width: 100%; }
  .hero__bio { margin: 0 auto 36px; }
  .hero__actions { justify-content: center; }
  .hero__socials { justify-content: center; }
  .hero__visual { width: 240px; height: 240px; }
  .hero__avatar, .hero__avatar-img { width: 180px; height: 180px; }
  .hero__float { display: none; }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 100px 0;
}
.section__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(108,99,255,0.12);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  border: 1px solid rgba(108,99,255,0.25);
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 60px;
  line-height: 1.1;
}

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--bg); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: start;
}
.about__text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat__num::after { content: '+'; }
.stat__label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
}
.about__card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.facts { list-style: none; }
.facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-soft);
  font-size: 0.95rem;
}
.facts li:last-child { border-bottom: none; }
.facts__icon { font-size: 1.1rem; flex-shrink: 0; }

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__stats { flex-wrap: wrap; gap: 24px; }
}

/* ============================================
   SKILLS
   ============================================ */
.skills { background: var(--bg-card); }
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}
.skills__category {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
}
.skills__category h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.skill-bars { display: flex; flex-direction: column; gap: 16px; }
.skill-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
}
.skill-bar span:first-child {
  font-size: 0.88rem;
  color: var(--text-soft);
}
.bar {
  width: 110px;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.pct {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 34px;
  text-align: right;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-badges span {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(108,99,255,0.1);
  color: var(--text-soft);
  border: 1px solid rgba(108,99,255,0.2);
  transition: var(--transition);
}
.tech-badges span:hover {
  background: rgba(108,99,255,0.25);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   PROJECTS
   ============================================ */
.projects { background: var(--bg); }

.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 50px;
  border: 1.5px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  background: rgba(108,99,255,0.12);
  color: var(--accent);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.project-card:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-4px);
}
.project-card:hover::before { transform: scaleX(1); }

.project-card.featured {
  border-color: rgba(108,99,255,0.4);
}
.featured-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(255,101,132,0.12);
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid rgba(255,101,132,0.25);
  margin-bottom: 12px;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.project-card__icon { font-size: 2rem; }
.project-card__links {
  display: flex;
  gap: 10px;
}
.project-card__links a {
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.project-card__links a:hover { color: var(--accent); transform: translateY(-2px); }

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-card.hidden { display: none; }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-card__tags span {
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
  padding: 3px 10px;
  border-radius: 50px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--bg-card); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}
.contact__info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 32px;
}
.contact__details { display: flex; flex-direction: column; gap: 16px; }
.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.contact__item svg { color: var(--accent); flex-shrink: 0; }

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  resize: vertical;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(108,99,255,0.06);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-error {
  font-size: 0.8rem;
  color: #ff6b6b;
  min-height: 18px;
}
.form-success {
  display: none;
  text-align: center;
  padding: 14px;
  background: rgba(67,233,123,0.1);
  border: 1px solid rgba(67,233,123,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent3);
  font-size: 0.9rem;
  font-weight: 500;
}
.form-success.show { display: block; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  text-align: center;
}
.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer strong { color: var(--accent); }
.footer__sub {
  font-size: 0.8rem;
  margin-top: 6px;
  opacity: 0.5;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover { background: #7c74ff; transform: translateY(-2px) !important; }

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .section { padding: 70px 0; }
  .projects__grid { grid-template-columns: 1fr; }
}
