/* ============================================
   ENRIQUE YANUAR — DARK EDITORIAL PORTFOLIO
   Merged: Juan's editorial warmth + dev identity
   Fonts: DM Sans + Lora + JetBrains Mono
   ============================================ */

:root {
  --bg: #0d0d0d;
  --card: #1c1c1c;
  --card-hover: #222;
  --border: rgba(166, 166, 166, 0.15);
  --border-hover: rgba(166, 166, 166, 0.28);
  --text: #f0f0f0;
  --text-sub: #ccc;
  --text-muted: #888;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.1);
  --radius: 15px;
  --font-body: "DM Sans", sans-serif;
  --font-serif: "Lora", serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-w: 1200px;
  --nav-h: 80px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #333 var(--bg);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--nav-h);
}
body.nav-open { overflow: hidden; }

::selection {
  background: rgba(0, 255, 136, 0.25);
  color: #fff;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Animated gradient bg (Juan-style) ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, #1a1a1a, #000, #1a1a1a);
  background-size: 400% 400%;
  animation: gradShift 20s ease infinite;
  z-index: -2;
}
.bg-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 1;
}
@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: none;
  z-index: 1000;
}

.nav-name {
  font-size: 17px;
  font-weight: 500;
}
.nav-role {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

.nav-center {
  display: flex;
  gap: 8px;
  background: none;
  border-radius: 30px;
  padding: 5px;
  border: none;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 25px;
  transition: all 0.3s ease;
}
.nav-link:hover {
  background: rgba(82, 82, 82, 0.4);
  color: #fff;
}

.nav-external { display: flex; gap: 24px; }
.nav-ext {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color 0.3s;
}
.nav-ext::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-ext:hover { color: var(--accent); }
.nav-ext:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO — split layout
   ============================================ */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  width: 90%;
  max-width: var(--max-w);
  margin: 12vh auto 16vh;
}

.hero-left {
  flex: 2;
}
.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 80px;
  letter-spacing: -0.02em;
}
.hero-title em {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
}

.hero-details {
  display: flex;
  gap: 40px;
}
.hero-detail span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.hero-detail p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Greet card */
.greet-card {
  background: rgba(28, 28, 28, 0.7);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 320px;
}
.greet-card__photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 2px solid var(--border);
}
.greet-card__hello {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}
.greet-card__name {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}
.greet-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.greet-card__btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 25px;
  color: var(--text);
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}
.greet-card__btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  width: 90%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px 0;
}
.section--center { text-align: center; }

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
}
.section-label--center { justify-content: center; }

.section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.section-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}
.section-title {
  font-size: 28px;
  font-weight: 600;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.skill-group__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  transition: all 0.3s;
}
.skill-pill:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.skill-pill img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px;
  transition: transform 0.25s;
}
.skill-pill:hover img { transform: scale(1.1); }
.skill-pill span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* ============================================
   PROJECTS — Juan-style work cards
   ============================================ */
.projects-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 28px 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s;
}
/* Radial glow on hover (Juan-style) */
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 255, 136, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
  border-radius: inherit;
}
.work-card:hover::before { opacity: 1; }
.work-card:hover { border-color: var(--border-hover); }

.work-card__body {
  position: relative;
  z-index: 1;
}
.work-card__title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}
.work-card__desc {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 40px;
}
.work-card__img {
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.work-card__img img {
  width: 75%;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.work-card:hover .work-card__img img {
  transform: translateY(0);
}

/* Arrow */
.work-card__arrow {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 28px;
  color: var(--text);
  z-index: 1;
  transition: transform 0.3s, color 0.3s;
}
.work-card:hover .work-card__arrow {
  transform: translateX(5px);
  color: var(--accent);
}

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

.testi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.testi-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.testi-card__text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
  font-style: italic;
  margin-bottom: 24px;
}
.testi-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  width: 100%;
}
.testi-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 255, 136, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.testi-card__author h4 {
  font-size: 14px;
  font-weight: 600;
}
.testi-card__author span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-intro {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 600;
  color: var(--accent);
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.04);
}
.contact-email:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0, 255, 136, 0.12);
  transform: translateY(-2px);
}
.contact-email .arrow-icon {
  transition: transform 0.3s;
}
.contact-email:hover .arrow-icon {
  transform: translateX(6px);
}
.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-sub);
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: all 0.3s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.contact-phone:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.1);
}
.contact-phone i { color: var(--accent); }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.contact-socials a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.3s;
}
.contact-socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-links { margin-bottom: 10px; }
.footer-links a {
  color: var(--text-muted);
  margin: 0 12px;
  font-size: 14px;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--accent); }
.footer-text {
  font-size: 13px;
  color: #555;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    margin: 6vh auto 10vh;
    gap: 40px;
  }
  .hero-title { margin-bottom: 40px; }
  .hero-right { width: 100%; }
  .greet-card { max-width: 100%; }
  .hero-details { flex-wrap: wrap; gap: 24px; }

  .testimonials-grid { grid-template-columns: 1fr; }
  .projects-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-id { display: none; }
  .nav-external { display: none; }
  .nav-toggle { display: flex; }

  .nav-center {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    border-radius: 0;
    border: none;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }
  .nav-center.open { transform: translateX(0); }
  .nav-link { font-size: 18px; padding: 12px 28px; }

  .hero { margin: 4vh auto 8vh; }
  .hero-title { font-size: 32px; margin-bottom: 32px; }
  .hero-details { flex-direction: column; gap: 16px; }

  .section { padding: 60px 0; }

  .skill-pill { padding: 10px 14px; }
  .skill-pill img { width: 28px; height: 28px; }
  .skill-pill span { font-size: 13px; }

  .work-card { padding: 20px 20px 0; }
  .work-card__title { font-size: 20px; }
  .work-card__desc { font-size: 14px; margin-bottom: 24px; }
  .work-card__img img { width: 95%; }
  .work-card__arrow { display: none; }

  .testi-card { padding: 24px 20px; }

  .contact-email {
    font-size: 16px;
    padding: 12px 20px;
    word-break: break-all;
  }
  .contact-phone {
    font-size: 15px;
    padding: 12px 24px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
