:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --text-primary: #222;
  --text-secondary: #303030;
  --text-tertiary: #666;
  --text-quaternary: #aaa;
  --border-color: #eee;
  --accent-color: #00d46a;
  --modal-overlay: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #f5f5f5;
  --text-tertiary: #999;
  --text-quaternary: #777;
  --border-color: #333;
  --accent-color: #00d46a;
  --modal-overlay: rgba(0, 0, 0, 0.85);
}

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

body {
  margin: 0;
  font-family: "Pretendard", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: row;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 섹션 스크롤 진입 */
.reveal {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

h1 {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  font-weight: 430;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}

h2 {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-secondary);
}

img {
  width: 100%;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: var(--text-primary);
}

ul,
ol {
  list-style: none;
}

/* 좌측 네비게이션 */
.title {
  font-size: 1.2rem;
  font-weight: 500;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.side-nav ul {
  list-style: none;
  padding: 0;
  padding: 1.5rem 2rem;
  flex: 1;
}

.side-nav li {
  margin-bottom: 0.8rem;
}

.side-nav a {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
}

.side-nav a:hover {
  color: var(--text-secondary);
}

.side-nav a sup {
  color: var(--text-quaternary);
  font-size: 0.7rem;
  font-weight: 400;
}

/* 콘텐츠 영역 */
.content {
  margin-left: 260px;
  padding: 0 0 2.5rem;
  min-width: 960px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content > * {
  width: 100%;
  max-width: 1450px;
  padding: 0 4rem 20rem;
}

.sub-title {
  margin-bottom: 1.8rem;
}

.sub-title sup {
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 400;
}

/* projects */
#title {
  width: 100%;
  max-width: 1450px;
  padding: 3rem 4rem 0;
}

#title p {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-quaternary);
  letter-spacing: -0.02em;
}

#cursor {
  display: inline-block;
  margin-left: 2px;
  transform: scaleX(0.8);
}

@keyframes blink {
  0%,
  50%,
  100% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0;
  }
}

#projects {
  padding-top: 10rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.thumb-datamenity {
  width: 100%;
  height: 350px;
  margin-bottom: 1rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0 12px 12px 12px;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.thumb-datamenity::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/thumb_datamenity.png") center / cover no-repeat;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.5s ease;
  border-radius: 0 12px 12px 12px;
}

.project-thumb {
  position: relative;
  padding-top: 28px;
}

.project-thumb .folder-label {
  position: absolute;
  top: 0;
  left: 0;
  height: 28px;
  padding: 0 12px;
  background: #d9f7e8;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: #00d46a;
  z-index: 2;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.thumb-heyvoca {
  width: 100%;
  height: 350px;
  margin-bottom: 0.8rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0 12px 12px 12px;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.thumb-heyvoca::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/thumb_heyvoca.png") center / cover no-repeat;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.5s ease;
  border-radius: 0 12px 12px 12px;
}


.thumb-heroworks {
  width: 100%;
  height: 350px;
  margin-bottom: 0.8rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0 12px 12px 12px;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.thumb-heroworks::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/thumb_heroworks.png") center / cover no-repeat;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.5s ease;
  border-radius: 0 12px 12px 12px;
}


.project-thumb:hover .thumb-datamenity::before,
.project-thumb:hover .thumb-heyvoca::before,
.project-thumb:hover .thumb-heroworks::before {
  transform: scale(1.05);
}

.project-thumb:hover .thumb-datamenity,
.project-thumb:hover .thumb-heyvoca,
.project-thumb:hover .thumb-heroworks {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.project-thumb p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.project-thumb:hover p {
  color: var(--text-secondary);
}

.project-thumb .arrow-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease, color 0.3s ease;
  color: currentColor;
  margin-left: auto;
  width: 20px;
  height: 20px;
}

.project-thumb:hover .arrow-icon {
  transform: translateX(4px);
  color: var(--accent-color);
}

/* Soon 클래스가 있는 경우 비활성화 스타일 */
.project-thumb:has(.soon) .arrow-icon {
  opacity: 0.3;
}

.project-thumb:has(.soon):hover .arrow-icon {
  transform: none;
  color: currentColor;
}

.soon {
  position: relative;
}

.soon::after {
  content: "soon";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

/* ===== Modal Base ===== */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.image-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--modal-overlay);
  z-index: 1;
}

/* Content Wrapper */
.modal-content {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 2;
  pointer-events: none;
}

.modal-content > * {
  pointer-events: auto;
}

/* modal */
.modal-content img {
  display: none;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;

  transform: scale(0.96);
  opacity: 0;
  transition: all 0.35s ease;
}

.image-modal.active .modal-content img {
  transform: scale(1);
  opacity: 1;
}

.modal-back {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;

  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.modal-back::before {
  content: "←";
  font-size: 18px;
  display: inline-block;
  margin-right: 4px;
}

.modal-back:hover {
  background: rgba(0, 0, 0, 0.8);
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Resolution Notice Modal */
.resolution-modal {
  position: fixed;
  bottom: 100px;
  left: 0;
  width: 260px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
  padding: 0 1.6rem;
}

.resolution-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.resolution-modal-content {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.resolution-modal-content p {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.resolution-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  border-radius: 4px;
}

.resolution-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.resolution-modal-close svg {
  width: 16px;
  height: 16px;
}

/* about me */
.aboutme-wrap {
  font-size: 1rem;
  text-align: left;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.profile-img {
  /*width: 420px;
  height: 550px;
  background: url("./image/profile2.png") no-repeat center/cover;
  border-radius: 50%;
  overflow: hidden;*/
  width: 25%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-img .profile {
  margin-top: 0;
}

.profile-img img {
  width: 100%;
  display: block;
  margin-bottom: 0;
  border-radius: 12px;
}

.profile-img {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.profile-cont {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-cont h3 {
  font-size: 1rem;
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-tertiary);
}

.profile-cont .profile p {
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.profile-cont .skills {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.profile-cont .skills ul {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
}

.profile-cont .skills ul li {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
  border-bottom: none;
  padding: 0.7rem 0;
}

.profile-cont .skills img {
  width: 2.5rem;
}

.profile-cont .skills ul li .gauge-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 250px;
  justify-content: center;
}

.profile-cont .skills .gauge-bar {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: var(--border-color);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.profile-cont .skills .gauge-fill {
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: var(--accent-color);
  transition: width 1s ease-out, background-color 0.3s ease;
}

.profile-cont ul {
  line-height: 1.4;
}

.profile-cont ul li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5rem;
  padding: 0.7rem 0 0.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.profile .profile-text {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  margin-top: 0.7rem;
  line-height: 1.5;
  color: var(--text-tertiary);
  letter-spacing: -0.05em;
}

.profile-cont ul li:last-child {
  margin-bottom: 0;
}

.profile-cont ul .period {
  font-size: 0.9rem;
  color: var(--text-quaternary);
  font-weight: 300;
}

.e-mail-icon svg {
  width: 2rem;
  fill: #3ad685;
}

/* contact */
#contact {
  padding-bottom: 3rem !important;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.contact-label {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-quaternary);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.contact-email-large {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  font-weight: 430;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
}

#contactForm {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
}

.form-field {
  margin-bottom: 2rem;
  position: relative;
}

.form-field label {
  font-size: 0.8rem;
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  background: transparent;
  font-family: "Pretendard", sans-serif;
  outline: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--text-secondary);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.send-button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  border: 1px solid var(--text-secondary);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 0.1em;
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-end;
  margin-left: auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.send-button:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.send-button .mail-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.send-button:focus {
  outline: none;
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.send-button:focus:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

footer {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 0.8rem;
  color: var(--text-quaternary);
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.side-nav footer {
  padding: 1.5rem 2rem;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--text-secondary);
  color: var(--bg-primary);
  border-color: var(--text-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .moon-icon {
  display: block;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

/* ✅ 반응형 처리 */
@media screen and (max-width: 1024px) {
  .side-nav {
    display: none;
  }

  .content {
    margin-left: 0;
    padding: 0 2rem 2.5rem;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media screen and (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .menu-toggle {
    display: block;
  }

  .side-nav {
    position: fixed;
    left: -100%;
    top: 0;
    width: 200px;
    height: 100vh;
    padding: 2rem 1rem;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  }

  .side-nav.open {
    left: 0;
  }

  .side-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .content {
    margin-left: 0;
    padding: 1.5rem;
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}
