/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  color: #8d6449;
  /* Subtitle: 枯茶 */
}

h2 {
  margin: 0;
  font-weight: normal;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  color: #56564b;
  /* Main title: 藍海松茶 */
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #8d6449;
  /* Subtitle: 枯茶 */
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
  color: #56564b;
  /* Main title: 藍海松茶 */
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background-color: #ffffd0;
}

.colored-box {
  color: black;
  padding: 20px;
  display: inline-block;
  border-radius: 10px;
}

body {
  background-color: #f8f4e6;
  /* Background: 象牙色 */
  color: #5a544b;
  /* Body text: 海松茶 */
}

a {
  color: #8b4c39;
  /* Link color: 胡桃色 */
  text-decoration: none;
}

a:focus,
a:hover {
  color: #a96b59;
  /* Lighter shade for hover */
  text-decoration: none;
}

.hidden {
  display: none;
}

/* --- Added Styles --- */

/* 1. Center content with consistent side margins */
.container {
  max-width: 800px;
  /* Set a max width for the content area */
  margin: auto auto auto auto;
  /* Center the container */
  padding-left: 40px;
  /* Side margins for mobile */
  padding-right: 40px;
  /* Side margins for mobile */
  padding-top: 40px;
}

/* 2. Adjust table layouts and prevent wrapping */
.table3f {
  width: 100%;
  border-collapse: collapse;
  /* Clean up borders */
}

.table3f td {
  vertical-align: top;
  padding: 0 .5rem;
}

/* 3. Align columns and set widths */
.td3f-left {
  width: 100px;
  text-align: right;
  white-space: nowrap;
}

.td3f-middle {
  text-align: left;
}

.td3f-right {
  text-align: right;
}

/* Make the top profile section responsive */
.profile-table {
  width: 100%;
}

.section {
  margin-bottom: 20px;
}

.profile-photo-container img {
  width: 200px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
}

/* --- 这部分代码用于桌面端 --- */

.profile-container {
  display: grid; /* 使用网格布局 */
  grid-template-columns: 1fr auto; /* 定义两列：左边一列自动填充，右边一列根据内容（照片）宽度自适应 */
  align-items: center; /* 垂直居中对齐 */
  gap: 0 2rem; /* 在列之间添加一些间距 */

  /* 
    这是关键！我们用 "区域名称" 来规划布局。
    可以把它看成一个2x2的网格蓝图。
  */
  grid-template-areas:
    "name  photo"  /* 第1行: 名字在左，照片在右 */
    "bio   photo"; /* 第2行: 简介(bio)在左，照片(photo)在右 */
}

/* 将HTML元素分配到指定的网格区域 */
.name {
  grid-area: name;
  text-align: center;
}

.profile-photo-container {
  grid-area: photo;
}

.profile-bio {
  grid-area: bio;
}


/* img:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
} */

/* 4. Responsive layout for mobile */
@media (max-width: 700px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .profile-container {
    /* Switch to a single-column layout */
    grid-template-columns: 1fr;
    /* Define the new order of elements */
    grid-template-areas:
      "name"
      /* 1. Name */
      "photo"
      /* 2. Photo */
      "bio"
    /* 3. Bio */
    "links";
    /* 4. Links */
    gap: 1em 0;
    /* Add some vertical spacing */
  }

  .profile-bio p {
    text-align: left;
    /* Optional: align bio text to the left on mobile */
  }

  .profile-photo-container {
    text-align: center;
  }

  .profile-photo-container img {
    width: 150px;
    /* Smaller photo on mobile */
  }

  .name {
    text-align: center;
  }

  .profile-links {
    grid-area: links;
    text-align: center;
    margin-top: -2rem;
  }
}