/* =========================================================
   VARIABLES
   ========================================================= */

:root {
  --sidebar-color: #496373;
  --header-color: #3b505d;

  --background-color: #f5f5f5;
  --white: #ffffff;

  --text-color: #4a4a4a;
  --heading-color: #333333;
  --muted-color: #999999;

  --sidebar-width: 300px;

  --content-padding: 48px;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 40px;

  background-color: var(--background-color);

  color: var(--text-color);

  font-family: "Roboto", sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* =========================================================
   MAIN RESUME
   ========================================================= */

.resume {
  width: 100%;
  max-width: 1024px;
  min-height: 1100px;

  margin: 0 auto;

  display: flex;
  flex-direction: row;

  background-color: var(--white);

  overflow: hidden;

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);

  display: flex;
  flex-direction: column;

  background-color: var(--sidebar-color);

  color: var(--white);
}


/* =========================================================
   SIDEBAR HEADER
   ========================================================= */

.sidebar-header {
  padding: 32px;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;

  background-color: var(--header-color);
}

.profile-image {
  width: 128px;
  height: 128px;

  margin-bottom: 24px;

  overflow: hidden;

  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.profile-image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.sidebar-header h1 {
  margin: 0 0 4px;

  color: var(--white);

  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;

  letter-spacing: -0.5px;
}

.sidebar-header p {
  margin: 0;

  color: rgba(255, 255, 255, 0.8);

  font-size: 18px;
  line-height: 1.4;
  font-weight: 300;
}


/* =========================================================
   SIDEBAR SECTIONS
   ========================================================= */

.sidebar-section {
  padding: 32px;
}

.sidebar-section--compact {
  padding-top: 0;
}

.sidebar-section h2 {
  margin: 0 0 24px;
  padding-bottom: 8px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.2);

  color: var(--white);

  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 2px;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 16px;

  font-size: 14px;
  line-height: 1.4;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  width: 16px;
  height: 16px;

  flex: 0 0 16px;

  opacity: 0.8;
}

.contact-item a {
  min-width: 0;

  color: var(--white);

  text-decoration: none;

  overflow-wrap: anywhere;
}

.contact-item a:hover {
  text-decoration: underline;
}


/* =========================================================
   EDUCATION
   ========================================================= */

.education-item {
  margin-bottom: 24px;
}

.education-item:last-child {
  margin-bottom: 0;
}

.education-item h3 {
  margin: 0 0 5px;

  color: var(--white);

  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.education-item p {
  margin: 0 0 4px;

  color: rgba(255, 255, 255, 0.7);

  font-size: 12px;
  line-height: 1.4;
}

.education-date {
  color: rgba(255, 255, 255, 0.5);

  font-size: 12px;
}


/* =========================================================
   SIDEBAR LISTS
   ========================================================= */

.sidebar-list {
  margin: 0;
  padding: 0;

  list-style: none;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 12px;

  margin-bottom: 8px;

  color: rgba(255, 255, 255, 0.8);

  font-size: 14px;
  line-height: 1.5;
}

.sidebar-list li:last-child {
  margin-bottom: 0;
}

.sidebar-list li > span:last-child {
  flex-shrink: 0;

  color: rgba(255, 255, 255, 0.4);

  font-weight: 300;
}

.skills-list li {
  display: block;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
  flex: 1;
  min-width: 0;

  padding: var(--content-padding);

  background-color: var(--white);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.resume-section {
  margin-bottom: 40px;
}

.resume-section:last-child {
  margin-bottom: 0;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.section-heading {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 24px;
}

.section-icon {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background-color: var(--header-color);

  color: var(--white);
}

.section-icon svg {
  width: 20px;
  height: 20px;

  display: block;
}

.section-heading h2 {
  margin: 0;

  color: var(--header-color);

  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 1.5px;
}


/* =========================================================
   GENERAL TEXT
   ========================================================= */

.section-text {
  margin: 0;

  color: #666666;

  font-size: 14px;
  line-height: 1.7;

  text-align: justify;
}


/* =========================================================
   EXPERIENCE / CERTIFICATIONS
   ========================================================= */

.experience-item,
.certification-item {
  margin-bottom: 40px;
}

.experience-item:last-child,
.certification-item:last-child {
  margin-bottom: 0;
}


/* =========================================================
   JOB HEADER
   ========================================================= */

.job-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 4px;
}

.job-header h3 {
  min-width: 0;

  margin: 0;

  color: var(--heading-color);

  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.job-header time {
  flex-shrink: 0;

  color: var(--muted-color);

  font-size: 14px;
  line-height: 1.4;
}


/* =========================================================
   COMPANY
   ========================================================= */

.company {
  margin: 0 0 16px;

  color: var(--sidebar-color);

  font-size: 14px;
  line-height: 1.4;
}


/* =========================================================
   JOB DESCRIPTION
   ========================================================= */

.job-description {
  margin: 0;

  color: #666666;

  font-size: 14px;
  line-height: 1.7;

  text-align: justify;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  body {
    padding: 20px;
  }

  .main-content {
    padding: 36px;
  }

  .sidebar-header {
    padding: 28px;
  }

  .sidebar-section {
    padding: 28px;
  }

  .sidebar-section--compact {
    padding-top: 0;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  body {
    padding: 0;
  }

  .resume {
    max-width: none;
    min-height: 100vh;

    flex-direction: column;

    box-shadow: none;
  }


  /* Sidebar becomes the first column */

  .sidebar {
    width: 100%;
    flex: none;

    order: -1;
  }


  /* Profile */

  .sidebar-header {
    padding: 32px 20px;
  }

  .profile-image {
    width: 112px;
    height: 112px;

    margin-bottom: 18px;
  }

  .sidebar-header h1 {
    font-size: 27px;
  }

  .sidebar-header p {
    max-width: 420px;

    font-size: 16px;
  }


  /* Sidebar sections */

  .sidebar-section {
    padding: 24px 20px;
  }

  .sidebar-section--compact {
    padding-top: 0;
  }


  /* Main content */

  .main-content {
    width: 100%;

    padding: 32px 20px;
  }


  /* Section headings */

  .section-heading {
    align-items: flex-start;

    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 18px;
    line-height: 1.35;
  }


  /* Job headers stack vertically */

  .job-header {
    display: block;

    margin-bottom: 4px;
  }

  .job-header h3 {
    margin-bottom: 5px;

    font-size: 17px;
    line-height: 1.4;
  }

  .job-header time {
    display: block;

    font-size: 13px;
  }


  /* Text */

  .section-text,
  .job-description {
    font-size: 14px;
    line-height: 1.65;

    text-align: justify;
  }


  /* Sidebar lists */

  .sidebar-list li {
    font-size: 14px;
  }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 400px) {

  .sidebar-header {
    padding: 28px 16px;
  }

  .sidebar-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-content {
    padding: 28px 16px;
  }

  .section-heading {
    gap: 10px;
  }

  .section-icon {
    width: 30px;
    height: 30px;

    flex-basis: 30px;
  }

  .section-icon svg {
    width: 18px;
    height: 18px;
  }

  .section-heading h2 {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .job-header h3 {
    font-size: 16px;
  }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 340px) {

  .sidebar-header h1 {
    font-size: 24px;
  }

  .sidebar-header p {
    font-size: 15px;
  }

  .main-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .sidebar-section {
    padding-left: 14px;
    padding-right: 14px;
  }

}