/* =========================================================
   Algundia Portfolio - Dark / Geek (Clean + Responsive)
   File: ./assets/styles.css
   ========================================================= */

/* -------------------------
   1) RESET / BASE
------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(46, 215, 255, 0.08), transparent 50%),
    radial-gradient(900px 600px at 90% 20%, rgba(155, 107, 255, 0.10), transparent 55%),
    #0b0f14;
  color: #e6edf3;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

::selection {
  background: rgba(46, 215, 255, 0.25);
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* -------------------------
   2) THEME VARS
------------------------- */
:root {
  --bg: #0b0f14;

  --panel: rgba(18, 24, 33, 0.85);
  --panel-2: rgba(14, 19, 27, 0.75);

  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.12);

  --text: #e6edf3;
  --muted: rgba(230, 237, 243, 0.72);
  --muted-2: rgba(230, 237, 243, 0.55);

  --accent: #2ed7ff;
  --accent-2: #9b6bff;

  --radius: 18px;
  --radius-sm: 12px;

  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.28);

  --gap: 24px;
}

/* -------------------------
   3) LAYOUT
------------------------- */
main {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--gap);
}

@media (max-width: 980px) {
  main {
    grid-template-columns: 1fr;
    width: min(920px, calc(100% - 24px));
  }
}

/* -------------------------
   4) PANELS
------------------------- */
.sidebar,
.main-content {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* -------------------------
   5) SIDEBAR
------------------------- */
.sidebar {
  position: sticky;
  top: 24px;
  height: fit-content;
}

@media (max-width: 980px) {
  .sidebar {
    position: relative;
    top: 0;
  }
}

.sidebar-info {
  padding: 22px 22px 18px;
  display: grid;
  gap: 14px;
}

.avatar-box {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, rgba(46, 215, 255, 0.12), rgba(155, 107, 255, 0.10));
}

.avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-content .name {
  margin: 2px 0 0;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

.info-content .title {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.sidebar-info_more {
  padding: 0 22px 20px;
}

.separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke-2), transparent);
  margin: 16px 0;
}

/* -------------------------
   6) CONTACTS (fix email wrap)
------------------------- */
.contacts-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(46, 215, 255, 0.08), rgba(155, 107, 255, 0.07));
}

ion-icon {
  font-size: 18px;
}

.contact-info {
  min-width: 0; /* CLAVE para que el texto largo se ajuste dentro del grid */
}

.contact-title {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted-2);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.contact-link,
.contact-info time,
.contact-info address {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.92rem;
  color: var(--text);
  opacity: 0.92;

  /* FIX email / textos largos */
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-break: anywhere;
}

/* -------------------------
   7) SOCIAL
------------------------- */
.social-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 107, 255, 0.32);
  background: rgba(155, 107, 255, 0.08);
}

/* -------------------------
   8) MAIN CONTENT + NAVBAR
------------------------- */
.main-content {
  padding: 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 18px;
  background: rgba(10, 14, 20, 0.75);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

.navbar-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.navbar-link {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.navbar-link:hover {
  transform: translateY(-1px);
  background: rgba(46, 215, 255, 0.06);
  border-color: rgba(46, 215, 255, 0.22);
  color: var(--text);
}

.navbar-link.active {
  background: linear-gradient(135deg, rgba(46, 215, 255, 0.16), rgba(155, 107, 255, 0.14));
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text);
}

/* -------------------------
   9) ARTICLE / TYPO
------------------------- */
article {
  display: none;
  padding: 22px 22px 26px;
}

article.active {
  display: block;
}

.article-title {
  margin: 4px 0 18px;
  font-size: 1.55rem;
  letter-spacing: 0.2px;
}

.h2, .h3, .h4, .h5 {
  margin: 0;
}

.h3 { font-size: 1.1rem; }
.h4 { font-size: 1rem; }
.h5 { font-size: 0.92rem; }

.about-text p {
  margin: 0 0 12px;
  color: var(--muted);
}

/* -------------------------
   10) SERVICES (cards)
------------------------- */
.service-title {
  margin: 22px 0 14px;
  color: var(--text);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 720px) {
  .service-list {
    grid-template-columns: 1fr;
  }
}

.service-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.10));
  box-shadow: var(--shadow-soft);
}

.service-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(46, 215, 255, 0.12), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(155, 107, 255, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.service-icon-box ion-icon {
  font-size: 22px;
  opacity: 0.95;
}

.service-item-title {
  margin: 0 0 6px;
  color: var(--text);
}

.service-item-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* =========================
   Skills Bars (pretty)
   ========================= */
.skills-list {
  display: grid;
  gap: 14px;
}

.skills-item .title-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.skills-item data {
  font-size: 0.9rem;
  color: var(--muted);
}

/* track */
.skill-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* fill */
.skill-bar > span {
  position: absolute;
  inset: 0;
  width: var(--level, 0%);
  border-radius: 999px;

  /* gradiente geek */
  background: linear-gradient(
    90deg,
    rgba(46, 215, 255, 0.95),
    rgba(155, 107, 255, 0.95)
  );

  /* sombra */
  box-shadow:
    0 10px 24px rgba(46, 215, 255, 0.12),
    0 8px 18px rgba(155, 107, 255, 0.10);

  /* animación */
  transform-origin: left;
  animation: skillFill 900ms ease-out both;
}

/* efecto brillo */
.skill-bar > span::after {
  content: "";
  position: absolute;
  inset: -20px -40px;
  background: linear-gradient(
    120deg,
    transparent 40%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 60%
  );
  transform: translateX(-30%);
  animation: skillShine 2.2s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes skillFill {
  from { width: 0%; filter: brightness(0.9); }
  to   { width: var(--level, 0%); filter: brightness(1); }
}

@keyframes skillShine {
  0%   { transform: translateX(-30%); }
  50%  { transform: translateX(30%); }
  100% { transform: translateX(-30%); }
}

/* accesibilidad: si alguien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .skill-bar > span,
  .skill-bar > span::after {
    animation: none !important;
  }
}

/* =========================
   Space between Certifications and Skills
   ========================= */

/* separa secciones dentro del resume */
.resume section + section {
  margin-top: 28px;
}

/* específicamente: que Skills no quede pegado al bloque anterior */
.resume .skill {
  margin-top: 34px;  /* ajusta a 28/34/40 según te guste */
}

/* que el título "Skills / Habilidades" tenga aire */
.resume .skills-title {
  margin: 0 0 14px;
}



/* -------------------------
   11) OPTIONAL: If you later add sections
------------------------- */

/* Timeline */
.timeline { margin-top: 18px; }
.title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.timeline-list { display: grid; gap: 12px; }
.timeline-item {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}
.timeline-item-title { margin: 0 0 6px; color: var(--text); }
.timeline-item span {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.timeline-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Blog */
.blog-posts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .blog-posts-list { grid-template-columns: 1fr; }
}
.blog-post-item a {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.blog-post-item a:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 107, 255, 0.26);
  background: rgba(155, 107, 255, 0.06);
}

/* Contact form */
.contact-form { margin-top: 10px; }
.form-title { margin-bottom: 12px; }
.form {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}
.input-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 620px) {
  .input-wrapper { grid-template-columns: 1fr; }
}
.form-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 14, 20, 0.65);
  color: var(--text);
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.form-input::placeholder {
  color: rgba(230, 237, 243, 0.45);
}
.form-input:focus {
  border-color: rgba(46, 215, 255, 0.35);
  background: rgba(10, 14, 20, 0.85);
}
textarea.form-input {
  min-height: 140px;
  resize: vertical;
  margin-bottom: 12px;
}
.form-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(46, 215, 255, 0.18);
  background: linear-gradient(135deg, rgba(46, 215, 255, 0.16), rgba(155, 107, 255, 0.14));
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}
.form-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(46, 215, 255, 0.32);
}
.form-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Map (si lo usas luego) */
.mapbox figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}
.mapbox iframe {
  width: 100%;
  height: 280px;
  border: 0;
}

/* =========================================================
   HACKER / GEEK UPGRADE (Drop-in)
   Pega esto al FINAL de styles.css
   ========================================================= */

/* 1) Nuevas vars neon/terminal */
:root{
  --neon: #2ed7ff;
  --neon2: #9b6bff;
  --matrix: rgba(46, 215, 255, 0.08);
  --danger: #ff4d6d;
  --ok: #2bd576;
}

/* 2) Fondo estilo terminal: grid + scanlines + noise */
body{
  position: relative;
  overflow-x: hidden;
}

/* Grid */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--matrix) 1px, transparent 1px),
    linear-gradient(to bottom, var(--matrix) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.14;
  mix-blend-mode: screen;
}

/* Scanlines */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 6px
  );
  opacity: 0.10;
  mix-blend-mode: overlay;
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove{
  0%{ transform: translateY(0); }
  100%{ transform: translateY(12px); }
}

/* Noise (ligero) */
@supports (background: url("data:image/svg+xml,<svg/>")) {
  body{
    background-image:
      radial-gradient(1200px 700px at 20% 10%, rgba(46, 215, 255, 0.10), transparent 50%),
      radial-gradient(900px 600px at 90% 20%, rgba(155, 107, 255, 0.12), transparent 55%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"),
      #0b0f14;
    background-blend-mode: screen, screen, overlay, normal;
  }
}

/* 3) Panels más “hacker glass” + borde neon */
.sidebar,
.main-content{
  position: relative;
  box-shadow:
    0 12px 30px rgba(0,0,0,.55),
    0 0 0 1px rgba(46,215,255,.08),
    0 0 24px rgba(46,215,255,.06),
    0 0 32px rgba(155,107,255,.05);
}

.sidebar::before,
.main-content::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: var(--radius);
  pointer-events:none;
  background: linear-gradient(135deg,
    rgba(46,215,255,.22),
    rgba(155,107,255,.18),
    transparent 60%);
  opacity: .35;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
}

/* 4) Navbar más neon + hover glitch light */
.navbar{
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.navbar-link{
  position: relative;
}

.navbar-link:hover{
  text-shadow: 0 0 12px rgba(46,215,255,.35);
}

.navbar-link.active{
  box-shadow:
    0 0 0 1px rgba(46,215,255,.10),
    0 10px 20px rgba(46,215,255,.08);
}

/* 5) Cards: hover “neon lift” */
.service-item,
.timeline-item,
.blog-post-item a,
.project-item a,
.contact-item{
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.service-item:hover,
.timeline-item:hover,
.blog-post-item a:hover,
.project-item a:hover,
.contact-item:hover{
  transform: translateY(-3px);
  border-color: rgba(46,215,255,.22);
  box-shadow:
    0 18px 40px rgba(0,0,0,.45),
    0 0 18px rgba(46,215,255,.10),
    0 0 22px rgba(155,107,255,.08);
}

/* 6) Avatar: ring neon + pulse */
.avatar-box{
  position: relative;
}

.avatar-box::after{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius: 26px;
  border: 1px solid rgba(46,215,255,.20);
  box-shadow:
    0 0 0 2px rgba(155,107,255,.08),
    0 0 18px rgba(46,215,255,.14);
  animation: avatarPulse 2.6s ease-in-out infinite;
  pointer-events:none;
}

@keyframes avatarPulse{
  0%,100%{ opacity:.55; filter: brightness(1); }
  50%{ opacity:.95; filter: brightness(1.05); }
}

/* 7) Nombre estilo terminal + cursor (opcional) */
.info-content .name{
  position: relative;
  display: inline-block;
  letter-spacing: .4px;
  text-shadow: 0 0 14px rgba(46,215,255,.18);
}

.info-content .name::after{
  content:"▮";
  margin-left: 6px;
  color: rgba(46,215,255,.85);
  animation: caretBlink 1s steps(1) infinite;
}

@keyframes caretBlink{
  50%{ opacity: 0; }
}

/* 8) Título badge: más “chip” */
.info-content .title{
  background:
    linear-gradient(135deg, rgba(46,215,255,.12), rgba(155,107,255,.10));
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 0 18px rgba(46,215,255,.06);
}

/* 9) Skills: un poco más separación + glow */
.skills-list{
  gap: 18px; /* más aire entre barras */
}

.skill-bar{
  height
  : 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.skill-bar > span{
  filter: saturate(1.1);
}

/* 10) Reduced motion */
@media (prefers-reduced-motion: reduce){
  body::after,
  .avatar-box::after,
  .info-content .name::after{
    animation: none !important;
  }
}
article{
  position: relative;
}

article::before{
  content:"● ● ●   session: N0R37urn@localhost";
  display:block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .78rem;
  letter-spacing: .2px;
  color: rgba(230,237,243,.65);
  padding: 10px 14px;
  margin: -22px -22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(10,14,20,.55);
}
.service-item-title:hover,
.article-title:hover{
  text-shadow:
    2px 0 rgba(46,215,255,.35),
    -2px 0 rgba(155,107,255,.25);
}