/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #333;
}

/* Link Styles */
a {
  color: #960039;
  text-decoration: none;
}

a:visited {
  color: #960039;
}

a:hover {
  color: #70072F;
  text-decoration: underline;
}

a:active {
  color: #960039;
}

.prof a {
  color: #333;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 2.5rem;
  color: #1a202c;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.5rem;
  color: #4a5568;
}

h2 {
  font-size: 1.8rem;
  color: #2d3748;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

h3 {
  font-size: 1.4rem;
  color: #2d3748;
  margin-bottom: 12px;
}

/* Profile Section */
.profile {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.profile-image {
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 10px auto;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 1px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.social-icon .icon {
  width: 100%;
  color: white;
  border-radius: 8px;
}

.social-icons .gmail {
  background-color: #F44336;
}

.social-icons .linkedin {
  background-color: #0B63BD;
}

.social-icons .github {
  background-color: #000000;
}

.social-icons .chess {
  background-color: #242321;
}

.social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
section {
  margin-bottom: 40px;
}

.experience-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Project Styles */
.project {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-policy{
  color: #718096;
  font-size: smaller;
}

.project-info {
  margin-right: 1.5em;
}

.project-meta .date {
  color: #718096;
}

/* Role & Experience Styles */
.role {
  margin-bottom: 24px;
}

.role .location {
  font-weight: 500;
  color: #4a5568;
}

.role .dates {
  color: #718096;
  font-style: italic;
  margin-bottom: 8px;
}

/* Education Section */
.education {
  margin-bottom: 40px;
}

.education h2 {
  font-size: 1.8rem;
  color: #2d3748;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.school {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.school-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.school-info {
  flex: 1;
}

.school h3 {
  font-size: 1.4rem;
  color: #2d3748;
  margin-bottom: 8px;
}

.school-info .location {
  font-weight: 500;
  color: #4a5568;
}

.school-info .major {
  font-weight: 500;
  color: #4a5568;
}

.school-info .dates {
  color: #718096;
  font-style: italic;
  margin-bottom: 2px;
}

.nchu-library-logo {
  max-height: 50px;
  max-width: 100%;
  border-radius: 8px;
}

.school-logo {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  margin-left: 20px;
  border-radius: 8px;
}

/* Awards Section */
.award .dates {
  color: #718096;
  font-style: italic;
  margin-bottom: 8px;
}

/* Skills Section */
.skill-category {
  margin-bottom: 24px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  background: #edf2f7;
  color: #2d3748;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Image Styles */
.inline-icon {
  height: 1.2em;
  vertical-align: middle;
  display: inline-block;
  margin: 0 4px;
  transition: transform 0.2s ease;
}

.inline-icon:hover {
  transform: scale(1.1);
}

.CudaParticleSimulation-gif {
  display: inline-block;
  margin: 4px;
  max-width: 200px;
  border-radius: 8px 8px 8px 8px;
}

.wizzardchess-gif {
  display: block;
  margin: 24px auto;
  max-width: 350px;
  border-radius: 8px;
}

.RandomBiomeGenerator-gif {
  display: block;
  margin: 24px auto;
  max-width: 300px;
  border-radius: 8px;
}

.WaveSimulator-gif {
  display: block;
  margin: 24px;
  max-width: 300px;
  border-radius: 8px;
}

.NMFImage {
  max-height: 350px;
  max-width: 100%;
  object-fit: contain;
}

.linebot-icon {
  max-height: 150px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.Calendar-YT {
  display: block;
  margin: 24px auto;
  max-width: 100%;
  border-radius: 8px;
}

.waveImage {
  height: 300px;
  width: auto;
  object-fit: contain;
  border: 1px solid #3333332a;
}

.raytracer-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 50%;
    place-items: center;
}

.raytracerImage {
  height: 150px;
  width: 200px;
  border: 1px solid #3333332a;
}

.synthesis-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.synthesisImage {
  height: 150px;
  width: auto;
  object-fit: contain;
  border: 1px solid #3333332a;
}

.spdkImage {
  height: 300px;
  width: auto;
  object-fit: contain;
  border: 1px solid #3333332a;
}

.unity-usc-image {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 10px auto;
}

.unity-image{
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 10px auto;
}

/* List Styles */
ul {
  list-style-position: inside;
  margin-left: 20px;
  margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 420px) {
  .container { padding:12px; margin:10px; }
  h1 { font-size:1.35rem; }
  .profile-image { width:140px; }
  .skill-tag { padding:6px 10px; font-size:0.85rem; }
  ul { margin-left:12px; }
  .project { padding:12px; }

  /* Make inline icons even bigger on very small phones */
  .inline-icon {
    height: 1.5em;
    margin: 0 8px;
  }

  h3 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .container { padding:18px; margin:14px; border-radius:10px; }
  h1 { font-size:1.6rem; }
  h2 { font-size:1.2rem; text-align:left; }
  h3 { font-size:1.05rem; }

  /* stack profile */
  .profile { flex-direction:column; text-align:center; gap:12px; align-items:center; }
  .profile-image { width:160px; }
  .social-icons { justify-content:center; }

  /* projects: description then image */
  .project-header { flex-direction:column; align-items:stretch; text-align:left; gap:12px; }
  .project-info { order:1; }
  .project-header > a, .project-header img { order:2; max-width:100%; }

  .project { padding:14px; }
  .project-meta { font-size:0.95rem; }

  /* Fix inline icons on mobile */
  .inline-icon {
    height: 1.4em;
    margin: 0 6px;
  }

  h3 .inline-icon {
    margin-left: 8px;
  }

  .skill-tags { justify-content:center; }

  /* easier touch targets */
  .social-icon { width:48px; height:48px; border-radius:12px; }

  .spdkImage { max-height:220px; }
  .waveImage { max-height:220px; }
  .raytracerImage { max-height:220px; }
  .synthesisImage { max-height:220px; }
}