@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
/* Material Symbols Rounded */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
/* FontAwesome for Brand Icons only */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
  --bg-color: #ffffff;
  --text-color: #111827;
  --text-muted: #6b7280;
  --accent-color: #000000;
  --border-color: #e5e7eb;
  --card-bg: #f9fafb;
  --nav-height: 70px;
  --max-width: 1200px;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] {
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #38bdf8;
  --border-color: #1e293b;
  --card-bg: #1e293b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 4rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.lang-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
}

.lang-toggle:hover {
  background: var(--border-color);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

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

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-color);
  color: var(--bg-color);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover);
  /* The GSAP scale will be handled via JS, but providing a fallback here */
  transform: translateY(-4px);
}

/* Loading Skeleton */
.skeleton {
  background: #f0f0f0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Hide desktop links */
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--bg-color);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

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

.linkstyle {
  margin-left: 10px
}

.linkstyle li {
  margin-top: 10px
}

.linkstyle li a img {
  margin-top: 5px;
  width: 100%;
  border-radius: 5px
}

/* TOP Button */
.top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--bg-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  transform: translateY(20px);
}

.top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-btn:hover {
  transform: scale(1.1);
}

/* Theme Toggle styles in navbar */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: var(--border-color);
}