/* Base */

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #222222;
  font-family: 'Glacial Indifference', -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
}

.site-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* Header + Nav */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
}

.site-title-text {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #111111;
  text-decoration: none;
}

.site-nav {
  align-self: center;
}

.site-nav .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.site-nav .nav li a {
  font-size: 1.5rem;
  color: #5c2a09;
  font-weight: 400;
  text-decoration: none;
}

.site-nav .nav li a:hover,
.site-nav .nav li.nav-current a {
  text-decoration: underline;
}

/* Typography */

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 3rem 0 1.1rem;   /* more top spacing before section titles */
  font-style: bold;
}

p {
  margin: 0 0 1.1rem;
  font-size: 1rem;
}

/* Jumbotron-style hero */

.about-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding: 1.75rem 1.5rem 2.25rem;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  background: #fafafa;
}

.about-main {
  flex: 1 1 auto;
}

.about-main p {
  max-width: 40rem;
}

/* Circular portrait on top-right */

.about-portrait {
  flex: 0 0 220px;
  display: flex;
  justify-content: flex-end;
}

.about-portrait img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: #777777;
  border-top: 1px solid #eeeeee;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-contact span {
  margin-right: 0.25rem;
}

.footer-contact a {
  color: #0044aa;
  text-decoration: underline;
}

.footer-contact a:hover {
  color: #002966;
}

.footer-separator {
  margin: 0 0.35rem;
}

.footer-copy {
  color: #999999;
}

/* Tables: Education, Skills, Projects */

.edu-table,
.skills-table,
.projects-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0 0;
  font-size: 0.95rem;
}

.edu-table thead,
.skills-table thead,
.projects-table thead {
  border-bottom: 2px solid #dddddd;
}

.edu-table th,
.edu-table td,
.skills-table th,
.skills-table td,
.projects-table th,
.projects-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

/* Table headers */

.edu-table th,
.skills-table th,
.projects-table th {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #666666;
  padding-bottom: 10px;
}

/* Zebra rows */

.edu-table tbody tr:nth-child(even),
.skills-table tbody tr:nth-child(even),
.projects-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* First column emphasis */

.edu-table td:first-child,
.skills-table td:first-child,
.projects-table td:first-child {
  font-weight: 450;
  color: #111111;
  width: 26%;
}

/* Second column slightly darker text for descriptions */

.edu-table td:nth-child(2),
.skills-table td:nth-child(2),
.projects-table td:nth-child(2) {
  color: #444444;
}

/* Extra gap after tables so next headings don't hug them */

.edu-table {
  margin-bottom: 2rem;
}

.skills-table {
  margin-bottom: 2rem;
}

.projects-table {
  margin-bottom: 2rem;
}

/* Links in tables */

.projects-table td a,
.skills-table td a,
.edu-table td a {
  color: #0044aa;
  text-decoration: underline;
}

.projects-table td a:hover,
.skills-table td a:hover,
.edu-table td a:hover {
  color: #002966;
}

/* Mobile responsiveness */

@media (max-width: 640px) {
  .site-wrapper {
    padding: 2rem 1.25rem 3rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-title-text {
    font-size: 1.8rem;
  }

  .site-nav {
    align-self: flex-start;
  }

  .site-nav .nav {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .site-nav .nav li a {
    font-size: 1.1rem;
  }

  /* FIX: Change hero to column layout and use 'order' to put the image first. */
  .about-layout {
    flex-direction: column; /* Stacks items vertically */
    gap: 1.5rem;
    align-items: center;
    padding: 1.75rem 1.5rem 2.25rem; 
  }

  .about-portrait {
    /* Set the image to display first (on top) */
    order: -1; 
    flex: 0 0 140px;
    justify-content: center;
    width: 100%; /* Ensures centering works */
  }

  .about-portrait img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
  }
  
  .about-main {
      /* Set the text block to display second (below the image) */
      order: 0; 
      flex: 1 1 auto;
      width: 100%; /* Ensures text uses full available width */
  }
  
  /* Update the h2 styling (since your HTML uses h2, not h1) */
  .about-main h2 {
      /* Center the heading "Senior Software Engineer" */
      text-align: center;
      margin: 0 0 1.1rem;
      font-size: 1.8rem; /* Match the desktop h1 size for mobile emphasis */
  }
  
  .about-main p {
      /* Keep long paragraphs left-aligned for readability */
      text-align: left;
      max-width: none;
  }


  .edu-table,
  .skills-table,
  .projects-table {
    font-size: 0.9rem;
  }
}
