@import 'normalize.css';

:root {
  --bg-color: #f8fafc;
  --bg-orb-1: #a5b4fc;
  --bg-orb-2: #fbcfe8;
  --bg-orb-3: #99f6e4;

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  --text-main: #334155;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  --accent-color: #3b82f6;
  --accent-hover: #2563eb;

  --h1-gradient: linear-gradient(to right, #0f172a, #3b82f6);
}

[data-theme='dark'] {
  --bg-color: #0b0f19;
  --bg-orb-1: #4f46e5;
  --bg-orb-2: #ec4899;
  --bg-orb-3: #14b8a6;

  --glass-bg: rgba(20, 25, 35, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-heading: #ffffff;

  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;

  --h1-gradient: linear-gradient(to right, #ffffff, #a5b4fc);
}

* {
  box-sizing: border-box;
}

html,
body {
  font-size: 16px;
  word-break: keep-all;
  font-family:
    'Pretendard Variable',
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    'Helvetica Neue',
    'Segoe UI',
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    'Malgun Gothic',
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    sans-serif;
  letter-spacing: -0.3px;
  color: var(--text-main);
  background-color: var(--bg-color);
  padding-bottom: 2rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Background Decorators */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-color);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  background: var(--bg-orb-1);
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  background: var(--bg-orb-2);
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  top: 40%;
  right: -5%;
  animation-delay: -5s;
}

.orb-3 {
  background: var(--bg-orb-3);
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  bottom: -20%;
  left: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

@media screen and (max-width: 960px) {
  html,
  body {
    font-size: 14px;
  }
}

section {
  padding: 0 2rem;
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

section:nth-child(1) {
  animation-delay: 0.1s;
}
section:nth-child(2) {
  animation-delay: 0.2s;
}
section:nth-child(3) {
  animation-delay: 0.3s;
}
section:nth-child(4) {
  animation-delay: 0.4s;
}
section:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

p {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--text-heading);
  font-weight: 700;
}

h1 {
  font-size: 4rem;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  background: var(--h1-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media screen and (max-width: 960px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 2.5rem;
  margin: 4rem 0 2rem 0;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

h3 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem 0;
}

h4 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

@media screen and (max-width: 960px) {
  h4 {
    font-size: 1.3rem;
  }
}

h5 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem 0;
  color: var(--text-main);
  font-weight: 600;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

ul ul {
  margin-bottom: 0;
}

ul > li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.2rem;
}

ul > li:before {
  position: absolute;
  left: 0;
  display: inline-block;
  content: '▹';
  color: var(--accent-color);
  font-weight: bold;
}

table {
  padding: 0;
  font-size: 1.05rem;
  border-spacing: 0;
  width: 100%;
}

table td {
  padding: 0.3rem 0;
  color: var(--text-muted);
}

table td strong {
  color: var(--text-heading);
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: auto;
  padding-top: 5rem;
  position: relative;
  z-index: 1;
}

.big-paragraph {
  font-size: 1.5rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-main);
}

@media screen and (max-width: 960px) {
  .big-paragraph {
    font-size: 1.3rem;
  }
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  margin-bottom: 2rem;
}

.glass-card:hover {
  box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.row {
  display: flex;
  gap: 3rem;
}

.row-left {
  flex-basis: 35%;
  flex-shrink: 0;
}

.row-left img {
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  width: 80%;
  max-width: 200px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.row-left img:hover {
  transform: scale(1.02);
}

.row-right {
  flex-grow: 1;
  flex-basis: 65%;
}

@media screen and (max-width: 960px) {
  .row {
    flex-direction: column;
    gap: 2rem;
  }

  .row-left {
    flex-basis: 100%;
  }
}

@media screen and (max-width: 768px) {
  section {
    padding: 0 1rem;
  }

  .glass-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
  }

  .container {
    padding-top: 3rem;
  }
}

.other {
  margin-bottom: 2rem;
}

.other .time {
  margin-bottom: 1rem;
}

.project {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.project:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.role {
  display: block;
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.time {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--accent-color);
  background: rgba(96, 165, 250, 0.1);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.comment {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Badges / Shields */
.skills-badges p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-badges img {
  border-radius: 6px;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.skills-badges img:hover {
  filter: brightness(1.1);
}

.project img,
.other img {
  border-radius: 12px;
  transition: transform 0.3s ease;
  margin-bottom: 1rem;
}

.project img:hover,
.other img:hover {
  transform: scale(1.02);
}

/* Asset Dashboard Gallery */
.asset-gallery {
  display: flex;
  flex-direction: column; /* 메인이 위, 썸네일이 아래 */
  gap: 1rem;
  margin-bottom: 2rem;
}

.asset-thumbnails {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.asset-thumbnails img {
  width: 139px; /* 데스크탑에서 적절한 크기 */
  flex-shrink: 0;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  margin-bottom: 0 !important;
}

.asset-thumbnails img:hover,
.asset-thumbnails img:focus {
  opacity: 1;
  transform: scale(1.05);
}

.asset-main-image {
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.asset-main-image #main-asset-img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0 !important;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.asset-main-image #main-asset-img:hover {
  transform: scale(1.01);
}

@media screen and (max-width: 768px) {
  .asset-thumbnails img {
    width: 25%;
  }
}
@media screen and (max-width: 480px) {
  .asset-thumbnails img {
    width: 33.333%;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-heading);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--glass-shadow);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
  font-size: 1.5rem;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}
