:root {
  --main-width: 36rem;
  --border-gray: #e4e4e4;
  --border-gray-lighter: #eeecea;
  --body-text: #2a2a2a;
  --light-text-gray: #828282;
  --yellow: #ffee66cc;
  --red: #ee4422;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--body-text);
  background-color: #fff;
  line-height: 1.8em;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: var(--body-text);
  padding-bottom: 0.125ex;
  border-bottom: 5px solid var(--yellow);
}

a:hover {
  color: var(--body-text);
  background: var(--yellow);
  border-bottom: 1px solid transparent;
}

a.external:after {
  content: "\2197";
  font-weight: bold;
  font-family: "Lucida Sans Unicode", "Lucida Grande", "DejaVu Sans", sans-serif;
  font-size: .8em;
  color: var(--red);
  vertical-align: middle;
  margin-left: 0.2em;
}

p {
  color: var(--body-text);
  line-height: 1.8em;
  margin: 0 0 1.8em 0;
  padding: 0;
}

p strong {
  font-weight: bold;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  margin: 0;
  padding: 0;
  color: var(--body-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.50em;
  line-height: 1.166em;
  font-weight: bold;
  margin: 0;
  padding: 0;
}

#header #myname {
  color: var(--body-text);
  border: none;
  font-style: normal;
  font-weight: 700;
  line-height: 1.166em;
  text-transform: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

#header #myname:hover {
  background: none;
  border-bottom: 5px solid var(--yellow);
}

h2 {
  display: block;
  font-size: 1.5em;
  text-transform: none;
  line-height: 1.166em;
  font-weight: 400;
  border: none;
  margin: 0;
  padding: 0 0 1em 0;
}

h3 {
  font-size: 1.1em;
  font-weight: 400;
  color: var(--body-text);
  margin: 1.5em 0 0.8em 0;
  padding: 0;
  line-height: 1.4em;
}

#all {
  padding-bottom: 7em;
}

#header {
  width: var(--main-width);
  margin: 3.5em auto 0 auto;
  text-transform: uppercase;
}

#header a {
  padding: 0;
  line-height: 1.8em;
}

#headercard p {
  margin: 0;
  padding: 0;
  line-height: 2.3;
}

#maincontents {
  position: relative;
  top: 0;
  margin: -0.5em auto 0 auto;
  padding: 3.5em 0 0 0;
  margin: 0 auto;
  width: var(--main-width);
}

.section {
  margin: 0 0 3.5em 0;
  padding: 0;
  clear: both;
}

.section + .section {
  margin: 0 0 7em 0;
  padding: 0;
  clear: both;
}

.sectioncontents {
  padding: 0;
  margin: 0;
  clear: both;
}

#occupation {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.8em;
  color: var(--light-text-gray);
}

#occupation p {
  margin: 0;
  padding: 0;
  line-height: 1.8em;
}

#cvsummary {
  padding: 0 0 1.8em 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2em;
}

#biomap {
  margin: 0;
  flex: 0 0 auto;
}

#biomap > svg {
  max-width: 100%;
  width: auto;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

#biotimeline {
  margin: 0;
  flex: 0 1 auto;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 0.9em;
}

#biotimeline table {
  border-collapse: collapse;
}

#biotimeline td {
  padding: 0.2em 0.5em;
  vertical-align: top;
  line-height: 1.6em;
}

#biotimeline td:first-child {
  text-align: center;
  width: 1.5em;
  font-size: 1.2em;
}

table {
  border-collapse: collapse;
  margin: 0;
}

td {
  vertical-align: top;
  padding: 0.5em;
}

/* Responsive */
@media only screen and (max-width: 767px) {
  #header,
  #maincontents {
    width: 100%;
    padding-left: 2em;
    padding-right: 2em;
    box-sizing: border-box;
  }

  #cvsummary {
    flex-wrap: wrap;
  }

  #biotimeline {
    margin: 1.8em 0 0 0;
  }
}


/* Gallery Styles */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--border-gray-lighter);
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Responsive Gallery */
@media only screen and (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Gallery Button */
.btn-gallery {
  display: inline-block;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.3em 0.8em;
  border: 1px solid var(--body-text);
  border-radius: 4px;
  color: var(--body-text);
  text-decoration: none;
  margin-left: 1em;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--body-text); /* Override default link style */
}

.btn-gallery:hover {
  background-color: var(--body-text);
  color: #fff;
  border-bottom: 1px solid var(--body-text);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1.5em;
  align-items: center;
  margin: 1em 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5em;
  height: 2.5em;
  border: 2px solid var(--body-text);
  border-radius: 50%;
  color: var(--body-text);
  border-bottom: 2px solid var(--body-text);
  transition: all 0.2s ease;
  font-size: 1.2em;
}

.social-links a:hover {
  background-color: var(--body-text);
  color: #fff;
  transform: scale(1.1);
  border-bottom: 2px solid var(--body-text);
}

@media only screen and (max-width: 767px) {
  .social-links {
    gap: 1em;
  }
  
  .social-links a {
    width: 2.2em;
    height: 2.2em;
    font-size: 1em;
  }
}

/* Content List Styling */
ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em 0;
}

ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.8em;
  line-height: 1.8em;
}

ul li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: bold;
}

/* Highlight Box for Key Stats */
.highlight-stat {
  display: inline-block;
  background: linear-gradient(to bottom, transparent 50%, var(--yellow) 50%);
  padding: 0 0.2em;
  font-weight: bold;
}

/* Section with subtle background */
.section-highlight {
  background: linear-gradient(to right, var(--border-gray-lighter) 0%, transparent 100%);
  padding: 2em;
  margin: 2em -2em;
  border-radius: 8px;
}

@media only screen and (max-width: 767px) {
  .section-highlight {
    margin: 2em 0;
    padding: 1.5em;
  }
}

/* ASCII Art Styling */
pre.ascii-box,
pre.ascii-badge,
pre.ascii-flow,
pre.ascii-map {
  font-family: "Courier New", "Monaco", monospace;
  font-size: 0.75em;
  line-height: 1.4em;
  color: var(--light-text-gray);
  background: var(--border-gray-lighter);
  padding: 1em 1.5em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--border-gray);
}

pre.ascii-box {
  text-align: center;
  font-weight: bold;
  color: var(--red);
  background: linear-gradient(to bottom, var(--yellow), transparent);
}

pre.ascii-badge {
  text-align: center;
  color: var(--body-text);
}

pre.ascii-flow,
pre.ascii-map {
  color: var(--body-text);
}

@media only screen and (max-width: 767px) {
  pre.ascii-box,
  pre.ascii-badge,
  pre.ascii-flow,
  pre.ascii-map {
    font-size: 0.6em;
    padding: 0.8em;
    overflow-x: scroll;
  }
}
