/* * {
  outline: 1px solid red;
}

* {
  box-sizing: border-box;
} */

html {
  scroll-behavior: smooth;
}

body {
  padding: 1px;
  margin: 0px;
  background-color: #f1f1f1;
}

body.fade {
  opacity: 0;
  
  /* transition: opacity 0.1s ease; */
}

body:not(.fade) {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.main {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f1f1f1;
  color: #333;

  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.introduction {
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 0.5em auto;
  padding: 0 1rem;
}

.container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow-x: hidden;
  box-sizing: border-box;
}

.navigation { 
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0px;
}

.navigation a {
  text-decoration: none;
  min-width: 100px;
  transition: transform 0.3s ease;
 
  font-size: 15px;
  border-bottom: 2px solid #333;
  color: #333;
  padding-bottom: 5px;
  text-decoration: none;
}

.navigation a:hover {
 border-bottom: 0px;
 transform: scale(1.2); 
}


.footer {
  font-size: 0.85rem;
  /* max-width: 100%; */
  
   color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.footer p {
  margin-bottom: 1px;
}


.fade-out {
  opacity: 0;
}

.fade-in {
  opacity: 1;
}

.main-title a {
  text-decoration: none;
  color: #333;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #ddd;
  margin-bottom: 1rem;
  transition: transform 0.6s;
    transition: opacity 0.4s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
  }
  
  .fade-out {
    opacity: 0;
  }
  
  .fade-in {
    opacity: 1;
  }
  
  @keyframes spinY {
    from {
      transform: rotateY(0deg);
    }
    to {
      transform: rotateY(360deg);
    }
  }
  
  .avatar.spin-y {
    animation: spinY 1s linear;
  }

h1 {
  margin: 0;
  font-size: 1.5rem;
}

.bio {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 2rem;
}

.links a {
  display: block;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.links a:hover {
  background: #444;
}


.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr; /* fallback */
  margin-top: 20px;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}



.card {
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  color: #333;
  background-color: #fff;
  text-decoration: none;
}

.card img {
  height: 60%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  height: 30%;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card:hover, .card-with-text:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}



.card-content {
  padding: 1rem;
  text-align: left;
  height: 128px;
 
}

.card-content h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  text-decoration: underline;
}

.card-content p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.content {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
}

.social-media {
  display: flex;
  justify-content: center;
  align-items: center;
  /* gap: 24px; not working */
}

.social-media a {
  margin-right: 10px;
}

.social-media a:last-child {
  margin-right: 0;
}

.card-with-text {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: sans-serif;
  color: white;
}

.card-with-text img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  filter: brightness(35%);
}

.card-text {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 16px;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  box-sizing: border-box;
  text-align: left;
  
}

.language-switch {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  background: #333;
  justify-self: center;
  /* breaks with Japanese max-width: 200px; */
  border-radius: 9999px;
  color: #000;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  background-color: #e0e0e0;
  border: none;
  border-radius: 9999px;
  padding: 5px;
  font-size: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button, a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.lang-btn:focus {
  outline-style: none;
}

.lang-btn:hover {
  background-color: #ccc;
  /* transform: scale(1.05); */
}

.lang-btn.active {
  background-color: #bbb; /* darker to show it's selected */
  font-weight: bold;
}


.lang-btn:not(.active){
  background-color: #333;
}

.lang-btn:not(.active){
  background-color: #333;
}

@media (max-width: 436) {
  .lang-btn span {
    vertical-align: center;
  }
}

.lang-btn span {
  font-size: 12px;
  border-radius: 0px;
  padding: 0px;
}

.lang-btn:not(.active) span{
  color: #999;
}

.pt, .en, .jp {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.pt.active, .en.active, .jp.active {
  display: block;
  opacity: 1;
}

#freelance {
  color: white;
  padding: 20px;
  padding-top: 10px;
  text-align: left;
  border-radius: 16px;
  background-color: #333;
}

#freelance a {
  color: #111;
}

#jung {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.75rem 1rem;
  background-color: #fff;
  color: #333;
  border: 1px solid #333;
  border-radius: 99px;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 1000;
  display: none;
}

#jung.alive {
  opacity: 1;
  pointer-events: auto;
}

#line-wrapper {
  display: flex;
  max-width: 80px; 
  align-self: center;
  justify-self: center;
}

#articles {
  margin-top: 40px;
  text-align: left;
}

.intro-text {
  color: inherit;
  text-decoration: none;
}

.intro-text:visited {
  color: inherit;
}

.cta {
  background-color: #25D366;
  border-radius: 25px;
  color: white;
  width: 250px;
  height: 50px;
  display: inline-block; /* or block */
  line-height: 50px;      /* vertically center text */
  text-align: center;     /* horizontally center text */
  font-size: 18px;
  text-decoration: none;
  padding: 10px;
}
