/**
* Template Name: iPortfolio - v1.2.1
* Template URL: https://bootstrapmade.com/iportfolio-bootstrap-portfolio-websites-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
html {
  scroll-behavior: auto;
}

body {
  font-family: "Open Sans", sans-serif;
  color: #272829;
}

a {
  color: #149ddd;
}

a:hover {
  color: #37b3ed;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Raleway", sans-serif;
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50px;
  right: 15px;
  bottom: 15px;
  background: #149ddd;
  color: #fff;
  transition: display 0.5s ease-in-out;
  z-index: 99999;
}

.back-to-top i {
  font-size: 24px;
  position: absolute;
  top: 7px;
  left: 8px;
}

.back-to-top:hover {
  color: #fff;
  background: #2eafec;
  transition: background 0.2s ease-in-out;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  transition: all ease-in-out 0.5s;
  z-index: 9997;
  transition: all 0.5s;
  padding: 0 15px;
  background: #040b14;
  overflow-y: auto;
}

#header .profile img {
  margin: 15px auto;
  display: block;
  width: 120px;
  border: 8px solid #2c2f3f;
}

#header .profile h1 {
  font-size: 24px;
  margin: 0;
  padding: 0;
  font-weight: 600;
  -moz-text-align-last: center;
  text-align-last: center;
  font-family: "Poppins", sans-serif;
}

#header .profile h1 a, #header .profile h1 a:hover {
  color: #fff;
  text-decoration: none;
}

#header .profile .social-links a {
  font-size: 18px;
  display: inline-block;
  background: #212431;
  color: #fff;
  line-height: 1;
  padding: 8px 0;
  margin-right: 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

#header .profile .social-links a:hover {
  background: #149ddd;
  color: #fff;
  text-decoration: none;
}

/* Language switch (segmented control, same palette as the social buttons) */
#header .lang-switch {
  display: flex;
  width: 96px;
  margin: 16px auto 0;
  padding: 3px;
  background: #212431;
  border-radius: 20px;
}

#header .lang-switch button {
  flex: 1;
  border: 0;
  padding: 5px 0;
  border-radius: 17px;
  background: transparent;
  color: #a8a9b4;
  font: 600 12px/1 "Poppins", sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: 0.3s;
}

#header .lang-switch button:hover {
  color: #fff;
}

#header .lang-switch button[aria-pressed="true"] {
  background: #149ddd;
  color: #fff;
}

#header .lang-switch button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

#main {
  margin-left: 300px;
}

@media (max-width: 1199px) {
  #header {
    left: -300px;
  }
  #main {
    margin-left: 0;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
.nav-menu {
  padding-top: 30px;
  margin-right: -15px;
}

.nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > ul > li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a {
  display: flex;
  align-items: center;
  color: #a8a9b4;
  padding: 12px 15px;
  margin-bottom: 8px;
  transition: 0.3s;
  font-size: 15px;
}

.nav-menu a i {
  font-size: 24px;
  padding-right: 8px;
  color: #6f7180;
}

.nav-menu a:hover, .nav-menu li:hover > a {
  text-decoration: none;
  color: #fff;
}

.nav-menu .active > a {
  text-decoration: none;
  color: #fff;
  background: rgba(20, 157, 221, 0.12);
  border-left: 3px solid #149ddd;
  padding-left: 12px;
}

.nav-menu a:hover i, .nav-menu .active > a i, .nav-menu li:hover > a i {
  color: #149ddd;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 15px;
  top: 15px;
  z-index: 9998;
  border: 0;
  background: none;
  font-size: 24px;
  transition: all 0.4s;
  outline: none !important;
  line-height: 1;
  cursor: pointer;
  text-align: right;
}

.mobile-nav-toggle i {
  color: #149ddd;
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active #header {
  left: 0;
}

.mobile-nav-active .mobile-nav-toggle i {
  color: #fff;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
  width: 100%;
  height: 100vh;
  background: url("../img/hero-br-raul-2.2.jpeg");
  background-size: cover;
}

/* Small screens: keep the face (~63% across the photo) in frame and move the
   title down onto the shirt, so the text does not cover it. */
@media only screen and (max-width: 768px) {
  #hero {
    height: 100vh;
    height: 100svh;
    background-position: 66% 30%;
    justify-content: flex-end !important;
    padding-bottom: 12vh;
  }

  section#hero:before {
    background: linear-gradient(to bottom, rgba(24, 28, 34, 0.15) 0%, rgba(24, 28, 34, 0.15) 45%, rgba(24, 28, 34, 0.65) 100%);
  }

  #hero .hero-container {
    align-self: flex-start;
    padding: 0 24px;
    min-width: 0;
  }
}

#hero:before {
  content: "";
  background: rgba(24, 28, 34, 0.3);
  position: absolute;
  bottom: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

#hero .hero-container {
  position: relative;
  z-index: 2;
  min-width: 300px;
}

#hero h1 {
  margin: 0 0 10px 0;
  font-size: 64px;
  font-weight: 700;
  line-height: 56px;
  color: #fff;
}

#hero p {
  color: #fff;
  margin-bottom: 50px;
  font-size: 26px;
  font-family: "Poppins", sans-serif;
}

#hero p span {
  color: #fff;
  padding-bottom: 4px;
  letter-spacing: 1px;
  border-bottom: 3px solid #149ddd;
}

@media (min-width: 1024px) {
  #hero {
    background-attachment: fixed;
  }
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 28px;
    line-height: 36px;
  }
  #hero h2 {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 30px;
  }
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
  padding: 60px 0;
  overflow: hidden;
  min-height: 100vh;
}

.section-bg {
  background: #f5f8fd;
}

.section-title {
  padding-bottom: 30px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
  color: #173b6c;
}

.section-title h2::after {
  content: '';
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: #149ddd;
  bottom: 0;
  left: 0;
}

.section-title p {
  margin-bottom: 0;
}

/*--------------------------------------------------------------
# Publications
--------------------------------------------------------------*/
.publications {
  padding: 150px 0px;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about .content h3 {
  font-family: "Raleway", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #173b6c;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d0e8f5;
  margin-top: 28px;
  margin-bottom: 22px;
}

.about .content h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  background: #149ddd;
  border-radius: 2px;
  flex-shrink: 0;
}

.about .content h3:first-of-type {
  margin-top: 0;
}

.about .content p {
  text-align: justify;
}

.about .content ul {
  list-style: none;
  padding: 0;
}

.about .content ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f5fb;
  font-size: 14px;
  line-height: 1.5;
}

.about .content ul li:last-child {
  border-bottom: none;
}

.about .content ul li > i {
  font-size: 18px;
  padding-right: 0;
  color: #149ddd;
  flex-shrink: 0;
  margin-top: 1px;
}

.about .content p:last-child {
  margin-bottom: 0;
}

/* ── About: email list ───────────────────────────────── */
.about-email-list {
  list-style: none;
  padding: 0;
}

.about-email-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f5fb;
}

.about-email-list li:last-child {
  border-bottom: none;
}

.about-email-list li > i {
  font-size: 18px;
  color: #149ddd;
  flex-shrink: 0;
  margin-top: 3px;
}

.about-email-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #0d6e9a;
  background: #dff3fc;
  padding: 1px 8px;
  border-radius: 8px;
  margin-bottom: 3px;
  letter-spacing: 0.04em;
}

.about-email-list a {
  font-size: 13px;
  color: #272829;
  display: block;
}

.about-email-list a:hover { color: #149ddd; }

/* ── About: profile link cards ───────────────────────── */
.about-profile-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.about-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #d0e8f5;
  border-radius: 8px;
  color: #173b6c;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.about-profile-link:hover {
  background: #f0f7fd;
  color: #149ddd;
  border-color: #b8d8ef;
  text-decoration: none;
}

.about-profile-link > i:first-child,
.about-profile-link > svg {
  font-size: 20px;
  color: #149ddd;
  flex-shrink: 0;
}

.about-link-arrow {
  margin-left: auto;
  font-size: 18px;
  color: #c0ccd8;
}

/*--------------------------------------------------------------
# Facts
--------------------------------------------------------------*/
.facts {
  padding-bottom: 30px;
}

.facts .count-box {
  padding: 30px;
  width: 100%;
}

.facts .count-box i {
  display: block;
  font-size: 44px;
  color: #149ddd;
  float: left;
}

.facts .count-box span {
  font-size: 48px;
  line-height: 40px;
  display: block;
  font-weight: 700;
  color: #050d18;
  margin-left: 60px;
}

.facts .count-box p {
  padding: 15px 0 0 0;
  margin: 0 0 0 60px;
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  color: #122f57;
}

.facts .count-box a {
  font-weight: 600;
  display: block;
  margin-top: 20px;
  color: #122f57;
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  transition: ease-in-out 0.3s;
}

.facts .count-box a:hover {
  color: #1f5297;
}

/*--------------------------------------------------------------
# Teaching
--------------------------------------------------------------*/
.teaching .table-content {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(20, 157, 221, 0.10);
}

.teaching table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Open Sans", sans-serif;
}

.teaching th,
.teaching td {
  border: 1px solid #d0e8f5;
  padding: 10px 14px;
  text-align: center;
  vertical-align: middle;
}

.teaching table .hidden-cell {
  border: none;
  background: transparent;
}

.teaching table .table-header {
  background-color: #173b6c;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 12px 10px;
}

.teaching table .table-line-header {
  background-color: #e8f4fb;
  color: #173b6c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-right: 2px solid #149ddd;
}

.teaching table .class-code {
  display: inline-block;
  background-color: #149ddd;
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.teaching table .class-name {
  font-size: 13px;
  color: #272829;
  margin: 0;
  line-height: 1.4;
}

.teaching table .empty-cell {
  color: #bcd4e6;
  font-size: 18px;
}

.teaching table .disc-cell {
  padding: 0;
}

.teaching table .disc-cell-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  height: 100%;
  min-height: 90px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.teaching table .disc-cell-link:hover {
  background: #e8f4fb;
  text-decoration: none;
}

.teaching table .disc-cell-link:hover .class-name {
  color: #149ddd;
}

.teaching .content {
  margin-top: 30px;
}

.teaching .content h3 {
  font-weight: 700;
  font-size: 26px;
  color: #173b6c;
}

.teaching .content p {
  text-align: justify;
}

.teaching .content ul {
  list-style: none;
  padding: 0;
}

.teaching .content ul li {
  padding-bottom: 10px;
}

.teaching .content ul i {
  font-size: 20px;
  padding-right: 2px;
  color: #149ddd;
}

/*--------------------------------------------------------------
# Skills
--------------------------------------------------------------*/
.skills .progress {
  height: 50px;
  display: block;
  background: none;
}

.skills .progress .skill {
  padding: 0;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  display: block;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  color: #050d18;
}

.skills .progress .skill .val {
  float: right;
  font-style: normal;
}

.skills .progress-bar-wrap {
  background: #dce8f8;
}

.skills .progress-bar {
  width: 1px;
  height: 10px;
  transition: .9s;
  background-color: #149ddd;
}

/*--------------------------------------------------------------
# Resume
--------------------------------------------------------------*/
.resume .resume-title {
  font-family: "Raleway", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #173b6c;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d0e8f5;
}

.resume .resume-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  background: #149ddd;
  border-radius: 2px;
  flex-shrink: 0;
}

.resume .resume-item {
  padding: 0 0 24px 24px;
  margin-top: 0;
  border-left: 2px solid #d0e8f5;
  position: relative;
}

.resume .resume-item h4 {
  line-height: 1.3;
  font-size: 16px;
  font-weight: 700;
  font-family: "Raleway", sans-serif;
  text-transform: none;
  color: #173b6c;
  margin-bottom: 8px;
}

.resume .resume-item h5 {
  font-size: 11px;
  background: #dff3fc;
  color: #0d6e9a;
  padding: 3px 11px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 10px;
}

.resume .resume-item ul {
  padding-left: 20px;
}

.resume .resume-item ul li {
  padding-bottom: 10px;
}

.resume .resume-item:last-child {
  padding-bottom: 0;
}

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: -7px;
  top: 3px;
  background: #149ddd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #149ddd;
}




/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
  padding: 15px;
  color: #f4f6fd;
  font-size: 12px;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 300px;
  z-index: 9999;
  background: #040b14;
}

#footer .copyright {
  text-align: center;
}

#footer .credits {
  padding-top: 5px;
  text-align: center;
  font-size: 12px;
  color: #eaebf0;
}

@media (max-width: 1199px) {
  #footer {
    position: static;
    width: auto;
    padding: 15px;
  }
}

/* ============================================================
   Responsive — Mobile & Small Screens
   ============================================================ */

/* Overlay when mobile nav is open */
.mobile-nav-ovl {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 11, 20, 0.65);
  z-index: 9996;
  cursor: pointer;
}

.mobile-nav-active .mobile-nav-ovl {
  display: block;
}

.mobile-nav-active .back-to-top {
  display: none !important;
}

/* --- Hero --- */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 36px;
    line-height: 44px;
  }
  #hero p {
    font-size: 18px;
    margin-bottom: 30px;
  }
}

@media (max-width: 400px) {
  #hero h1 {
    font-size: 26px;
    line-height: 32px;
  }
  #hero p {
    font-size: 15px;
  }
}

/* --- Section titles --- */
@media (max-width: 768px) {
  .section-title h2 {
    font-size: 22px;
    line-height: 30px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
}

/* --- Publications: excessive vertical padding --- */
@media (max-width: 768px) {
  .publications {
    padding: 60px 0;
  }
}

/* --- Resume: education logos --- */
.resume .icon-block img {
  max-height: 160px;
  width: auto;
  max-width: 100%;
  height: auto;
}

@media (max-width: 576px) {
  .resume .icon-block img {
    max-height: 100px;
  }
  .resume .resume-item h4 {
    font-size: 14px;
  }
  .resume .resume-item h5 {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* --- About responsive --- */
@media (max-width: 768px) {
  .about-profile-links {
    grid-template-columns: 1fr;
  }
  .about-email-list a {
    overflow-wrap: break-word;
    word-break: break-all;
  }
}

/* --- Teaching: long title + compact table --- */
@media (max-width: 768px) {
  #teaching .section-title h2 {
    font-size: 17px;
    line-height: 24px;
  }
  .teaching th,
  .teaching td {
    padding: 8px 7px;
  }
  .teaching table .table-header {
    font-size: 12px;
    padding: 10px 6px;
  }
  .teaching table .table-line-header {
    font-size: 11px;
  }
  .teaching table .class-name {
    font-size: 12px;
  }
}

/*--------------------------------------------------------------
# Teaching - mobile agenda (replaces the weekly grid on small screens)
--------------------------------------------------------------*/
.teaching .teaching-agenda {
  display: none;
}

@media (max-width: 768px) {
  .teaching .table-content {
    display: none;
  }

  .teaching .teaching-agenda {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .teaching .agenda-day {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #d0e8f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(20, 157, 221, 0.08);
  }

  .teaching .agenda-day-name {
    flex: 0 0 92px;
    margin: 0;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #173b6c;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .teaching .agenda-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
  }

  .teaching .agenda-class {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
  }

  .teaching .agenda-class .class-code {
    display: inline-block;
    background-color: #149ddd;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
  }

  .teaching .agenda-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #272829;
  }

  .teaching .agenda-class:hover .agenda-name {
    color: #149ddd;
  }

  .teaching .agenda-time {
    margin-top: 6px;
    font-size: 12px;
    color: #5a6b7d;
  }

  .teaching .agenda-day-empty {
    box-shadow: none;
    background: #f7fafd;
  }

  .teaching .agenda-day-empty .agenda-day-name {
    background-color: #8a9bb0;
  }

  .teaching .agenda-day-empty .empty-cell {
    color: #bcd4e6;
    font-size: 18px;
  }
}
