* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  background: #9D9D9D;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  color: #222;
  font-size: 14px;
  line-height: 26px;
  padding-bottom: 50px;
}

/* Text Animation for Name */
.animate-text {
  display: inline-block;
  opacity: 0;
  animation: slideInText 0.6s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes slideInText {
  0% {
    opacity: 0;
    transform: translateY(-30px) rotateX(90deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* Fade Up Animation */
.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Social Links Hover Effect */
.social-link {
  position: relative;
  transition: color 0.3s ease;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent, #54AFE4);
  transition: width 0.3s ease;
}

.social-link:hover::after {
  width: 100%;
}

.social-link:hover {
  color: var(--accent, #54AFE4) !important;
}

img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.animate__animated.animate__slideInDown {
  --animate-duration: 1.5s;
}

.animate__animated.animate__fadeInLeft {
  --animate-duration: 2s;
}

.delay-800ms {
  --animate-delay: 0.8s;
}

.container {
  max-width: 700px;
  background: #fff;
  margin: 0px auto 0px;
  box-shadow: 1px 1px 2px #DAD7D7;
  border-radius: 3px;
  padding: 40px;
  margin-top: 50px;
  animation: containerSlideIn 0.8s ease-out forwards;
}

@keyframes containerSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  margin-bottom: 30px;
}

.header .full-name {
  font-size: 40px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.header .first-name {
  font-weight: 700;
}

.header .last-name {
  font-weight: 300;
}

.header .contact-info {
  margin-bottom: 20px;
}

.header .email,
.header .phone {
  color: #999;
  font-weight: 300;
}

.header .separator {
  height: 10px;
  display: inline-block;
  border-left: 2px solid #999;
  margin: 0px 10px;
}

.header .position {
  font-weight: bold;
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(120deg, var(--accent, #54AFE4) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.details {
  line-height: 20px;
}

.details .section {
  margin-bottom: 40px;
}

.details .section:last-of-type {
  margin-bottom: 0px;
}

.details .section__title {
  letter-spacing: 2px;
  color: #54AFE4;
  font-weight: bold;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.details .section__list-item {
  margin-bottom: 40px;
}

.details .section__list-item:last-of-type {
  margin-bottom: 0;
}

.details .left,
.details .right {
  vertical-align: top;
  display: inline-block;
}

.details .left {
  width: 60%;
}

.details .right {
  tex-align: right;
  width: 39%;
}

.details .name {
  font-weight: bold;
}

.details a {
  text-decoration: underline;
  color: #000;
}

.details a:hover {
  text-decoration: underline;
  color: #000;
}

.details .skills__item {
  margin-bottom: 10px;
}

.details .skills__item .right input {
  display: none;
}

.details .skills__item .right label {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #C3DEF3;
  border-radius: 20px;
  margin-right: 3px;
}

.details .skills__item .right input:checked+label {
  background: #323232;
}

.clear {
  clear: both;
  margin-bottom: 20px;
}

.h {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  color: #54AFE4;
  font-size: 14px;
}

/* Minimalistic overrides */
body {
  background: #f7f7f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111;
}

.container {
  max-width: 680px;
  background: #ffffff;
  box-shadow: none;
  border-radius: 6px;
  padding: 36px;
  margin-top: 60px;
}

.header .full-name {
  font-size: 56px;
  letter-spacing: 1px;
  text-transform: none;
  font-weight: 800;
}

.separator {
  border-left: none;
  margin: 0 12px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.contact-info a {
  color: #333;
  text-decoration: none;
  opacity: 0.95;
  margin-right: 6px;
  font-weight: 400;
}

.contact-info a:hover {
  opacity: 1;
}

.contact-info--secondary {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
}

img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

/* Reduce visual noise from animations (kept, but subtle) */
.animate__animated {
  --animate-duration: 0.45s;
  opacity: 1 !important;
}

/* Theme variables */
:root {
  /* Light mode: neutral grey background with slightly softened surfaces */
  --bg: #9d9d9d;
  --card-bg: #fbfbfb;
  /* off-white for softer contrast */
  --text: #1f2937;
  /* smoother dark gray instead of pure black */
  --muted: #6b7280;
  --accent: #54AFE4;
  --button-bg: #eef2ff;
  --button-text: #0b1220;
}

.dark-theme {
  /* Dark mode: dark grey background and slightly lighter card */
  --bg: #1f1f1f;
  --card-bg: #242424;
  --text: #e5e7eb;
  /* softer near-white for readable text */
  --muted: #9aa6b2;
  --accent: #60a5fa;
  --button-bg: #2a2a2a;
  --button-text: #e6eef6;
}

/* apply variables */
body {
  background: var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
}

.container {
  background: var(--card-bg);
  transition: background .25s ease, color .25s ease;
  position: relative;
}

.header .full-name {
  color: var(--text);
}

.contact-info--secondary {
  color: var(--muted);
}

.contact-info a {
  color: var(--text);
}

/* Mode switch button */
.mode-switch {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 1000;
}

#theme-toggle {
  background: var(--button-bg);
  color: var(--button-text);
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}

#theme-toggle:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  .mode-switch {
    left: 12px;
    top: 12px;
  }

  .header .full-name {
    font-size: 26px;
  }
}

/* Ensure links are visible in both themes */
.container a,
.container a:visited {
  color: var(--accent);
  text-decoration: none;
}

.container a:hover,
.container a:focus {
  color: var(--text);
  text-decoration: underline;
}

/* Specific smaller targets */
.contact-info a,
.details a,
.about a {
  color: var(--accent);
}

.contact-info a:hover,
.details a:hover,
.about a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Reduce vertical gap between contact row and about/position in header */
.header .clear {
  margin-bottom: 8px;
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section Styling Enhancements */
.section {
  padding: 20px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.02);
  /* Very subtle background for sections */
  margin-bottom: 30px;
  transition: background-color 0.3s ease;
}

.dark-theme .section {
  background-color: rgba(255, 255, 255, 0.05);
}

.section:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.dark-theme .section:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* List Item Hover Effects */
.section__list-item {
  padding: 10px;
  border-radius: 5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section__list-item:hover {
  transform: translateX(5px);
  background-color: rgba(0, 0, 0, 0.03);
}

.dark-theme .section__list-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Hosted Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.section__desc {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 20px;
  font-style: italic;
}

.dark-theme .section__desc {
  color: #aaa;
}

.tool-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  animation: cardFadeIn 0.5s ease-out forwards;
  animation-delay: var(--card-delay, 0s);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.tool-card:hover::before {
  left: 100%;
}

@keyframes cardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dark-theme .tool-card {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  border-color: #444;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: var(--accent, #54AFE4);
}

.dark-theme .tool-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.tool-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  display: block;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.2) rotate(10deg);
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

  0%,
  100% {
    transform: scale(1.2) rotate(10deg);
  }

  50% {
    transform: scale(1.3) rotate(-5deg);
  }
}

.tool-card .name {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 1.1em;
}

.tool-card .desc {
  font-size: 0.9em;
  color: #666;
}

.dark-theme .tool-card .desc {
  color: #aaa;
}