@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;700;900&display=swap');

:root {
  --bg-main:        #0d1f21;
  --bg-surface:     #182527;
  --bg-surface-alt: #1e2d2f;
  --color-primary:  #3ab073;
  --color-dim:      #2a8252;
  --color-bright:   #5ecf95;
  --color-border:   rgba(175, 210, 175, 0.15);
  --font:           'Inconsolata', monospace;
  --header-h:       48px;
  --radius:         8px;
  --ease:           0.22s ease;
}

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

body {
  background-color: var(--bg-main);
  color: var(--color-primary);
  font-family: var(--font);
  font-size: 1.05rem;
  margin: 0;
  padding-top: var(--header-h);
}

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

/* ── HEADER ─────────────────────────────────────── */

.menu-superior {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.logo { display: flex; align-items: center; }
img.logo { width: 32px; height: 32px; }

ul.menu-links {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 2px;
}

.menu-links li a {
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background var(--ease), color var(--ease);
  display: block;
}

.menu-links li a:hover {
  background: rgba(58, 176, 115, 0.1);
  color: var(--color-bright);
}

.menu-links li a.active {
  background: rgba(58, 176, 115, 0.18);
  color: var(--color-bright);
  font-weight: 700;
}

/* ── MAIN CONTENT ───────────────────────────────── */

.home-area {
  padding: 8px 16px 40px;
  font-family: var(--font);
}

/* Fade-in on every visible section */
.section,
.section-my-work,
.section-explorin-code,
.big-section {
  animation: fadeIn 0.28s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section {
  font-size: 1rem;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 50%, var(--bg-surface) 100%);
  border: 1px solid var(--color-border);
  padding: 24px 28px;
  width: 82%;
  margin: 28px auto;
  border-radius: var(--radius);
}

#home-section { text-align: center; }

#home-section img.portada {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 4%;
  margin: 20px auto 0;
  display: block;
}

h1 { font-size: 1.8rem; margin-top: 0; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 1rem; font-weight: 500; }

a:link, a:visited {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--ease);
}
a:hover  { color: var(--color-bright); text-decoration: underline; }
a:active { color: var(--color-primary); }

.section a:link, .section a:visited {
  color: var(--color-primary);
  font-family: var(--font);
}

/* ── SKILLS ─────────────────────────────────────── */

.skils {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 16px;
}

.skill_item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--ease), color var(--ease);
  cursor: default;
}

.skill_item:hover {
  background: rgba(58, 176, 115, 0.07);
  color: var(--color-bright);
}

.skill_logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.skill_logo img {
  width: 20px;
  max-height: 20px;
  object-fit: contain;
  opacity: 0.75;
  filter: saturate(0.55);
  transition: opacity var(--ease), filter var(--ease);
}

.skill_item:hover .skill_logo img {
  opacity: 1;
  filter: saturate(1);
}

.skill_name {
  font-family: var(--font);
}

/* ── JOBS ────────────────────────────────────────── */

#jobs .job_section {
  font-family: var(--font);
  border-bottom: 1px solid var(--color-border);
  margin-top: 32px;
  padding-bottom: 28px;
}

#jobs .job_section:last-child { border-bottom: none; padding-bottom: 0; }

.job_header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.job_logo_link { flex-shrink: 0; line-height: 0; }

.job_logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  opacity: 0.9;
}

.job_info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.job_info h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.job_info h4 a { font-weight: 700; }

.job_role {
  font-size: 0.88rem;
  color: var(--color-primary);
  opacity: 0.85;
}

.job_dates {
  font-size: 0.82rem;
  color: var(--color-dim);
  letter-spacing: 0.02em;
}

.job_activities {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job_activities li {
  font-size: 0.95rem;
  padding-left: 1.4em;
  position: relative;
  line-height: 1.5;
}

.job_activities li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--color-dim);
  font-weight: 700;
}

/* ── EDUCATION ───────────────────────────────────── */

.edu_block { margin-bottom: 20px; }

.edu_block h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dim);
  margin: 0 0 8px 0;
}

.edu_list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 20px;
  margin: 0;
  padding: 0;
}

.edu_list dt {
  font-weight: 700;
  font-size: 0.95rem;
}

.edu_list dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-dim);
}

.course_list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  border-top: 1px solid var(--color-border);
}

.course_list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.93rem;
  line-height: 1.4;
}

.course_name { flex: 1; }

.course_meta {
  font-size: 0.8rem;
  color: var(--color-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── MY WORK ─────────────────────────────────────── */

.my_work {
  width: 84%;
  margin: 28px auto;
  border-radius: var(--radius);
  display: flex;
  gap: 0;
  animation: fadeIn 0.28s ease;
}

#menu-my-work {
  width: 21%;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

#my-work-sections {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 50%, var(--bg-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.menu-my-work .menu-my-work-links {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.menu-my-work-links li { padding: 2px 0; }

.menu-my-work-links li a {
  display: block;
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background var(--ease), color var(--ease);
}

.menu-my-work-links li a:hover {
  background: rgba(58, 176, 115, 0.1);
  color: var(--color-bright);
  text-decoration: none;
}

.section-my-work {
  color: var(--color-primary);
  font-family: var(--font);
  font-size: 1rem;
  padding: 24px 28px;
  animation: fadeIn 0.22s ease;
}

.section-my-work a:hover { text-decoration: underline; }

.projeckt-diagema { width: 100%; margin: 16px 0; }
.projeckt-diagema img { max-width: 100%; height: auto; border-radius: 2%; }

.diagram-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 8px;
  background: var(--bg-main);
}

.diagram-wrap svg {
  display: block;
  margin: 0 auto;
  max-width: none;
}

/* ── EXPLORING WITH CODE ─────────────────────────── */

.exploring_with_code {
  width: 82%;
  margin: 28px auto;
  border-radius: var(--radius);
  display: flex;
  gap: 0;
  animation: fadeIn 0.28s ease;
}

#menu-explorin-code {
  width: 20%;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

#explorin-code-sections {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 50%, var(--bg-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.menu-explorin-code .menu-explorin-code-links {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.menu-explorin-code-links li { padding: 2px 0; }

.menu-explorin-code-links li a {
  display: block;
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background var(--ease), color var(--ease);
}

.menu-explorin-code-links li a:hover {
  background: rgba(58, 176, 115, 0.1);
  color: var(--color-bright);
  text-decoration: none;
}

.section-explorin-code {
  color: var(--color-primary);
  font-family: var(--font);
  font-size: 1rem;
  padding: 24px 28px;
  animation: fadeIn 0.22s ease;
}

/* ── CONTACT ─────────────────────────────────────── */

.big-section {
  display: block;
  width: 82%;
  margin: 28px auto;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 50%, var(--bg-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  animation: fadeIn 0.28s ease;
}

.big-section a:link, .big-section a:visited {
  color: var(--color-primary);
}

/* ── FOOTER ──────────────────────────────────────── */

footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--color-dim);
  font-family: var(--font);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
  margin-top: 20px;
}

/* ── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 900px) {
  .section, .big-section, .exploring_with_code { width: 95%; }

  .my_work {
    width: 95%;
    flex-direction: column;
  }
  #menu-my-work {
    width: 100%;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  #my-work-sections {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .exploring_with_code { flex-direction: column; }
  #menu-explorin-code {
    width: 100%;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  #explorin-code-sections {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .menu-my-work-links li a,
  .menu-explorin-code-links li a {
    display: inline-block;
    padding: 6px 10px;
  }
  .menu-my-work .menu-my-work-links,
  .menu-explorin-code .menu-explorin-code-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }
}

@media (max-width: 600px) {
  .menu-superior {
    padding: 6px 12px;
    height: auto;
    flex-wrap: wrap;
    gap: 4px;
  }
  body { padding-top: 76px; }

  ul.menu-links { flex-wrap: wrap; gap: 2px; }
  .menu-links li a { font-size: 0.85rem; padding: 4px 8px; }

  .section, .section-my-work, .section-explorin-code, .big-section {
    padding: 16px;
    font-size: 0.95rem;
  }

  .skils { gap: 6px; }
  .skill_item { min-width: 110px; font-size: 0.88rem; padding: 5px 8px; }
}
