/* ============================================================
   STYLE.CSS  —  구조(Structural) 전용
   색상 변수는 css/palettes/*.css 에서 정의됩니다.
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Roboto', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

.navbar.scrolled .nav-logo,
.navbar.scrolled .nav-menu a,
.navbar.scrolled .nav-toggle { color: var(--text); }

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 2px;
  transition: color var(--transition);
}

.nav-menu { display: flex; gap: 2rem; }

.nav-menu a {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-menu a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  transition: color var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-50);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.8);
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg,
    var(--hero-from) 0%,
    var(--hero-mid)  50%,
    var(--hero-to)   100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, var(--hero-glow-1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--hero-glow-2) 0%, transparent 50%);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 0;
  position: relative;
  z-index: 1;
}

.hero-photo {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 40px var(--primary-50);
}

.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-greeting {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
  min-height: 1.6em;
}

.hero-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.9;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 0; }
.section-sm { padding: 3rem 0; }
.section-gray { background: var(--bg-secondary); }
.section-dark { background: var(--bg-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  color: var(--text);
}

.section-title.light { color: var(--text-on-dark); }

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.about-photo:hover img { transform: scale(1.04); }

.about-info h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.about-desc {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-item { display: flex; align-items: flex-start; gap: 0.8rem; }
.info-item i { color: var(--primary); margin-top: 3px; font-size: 1rem; }
.info-item div { display: flex; flex-direction: column; }

.label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value { font-weight: 500; font-size: 0.95rem; }
.value a { color: var(--primary); }

/* ===== SKILLS ===== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.skill-category:hover { box-shadow: var(--shadow-hover); }

.skill-category h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3 i { color: var(--primary); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ===== TAGS ===== */
.tag {
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

.tag-sm { padding: 0.2rem 0.6rem; font-size: 0.75rem; }

/* 아웃라인 태그 — Experience 섹션 전용 */
.tag-suite,
.tag-refractive,
.tag-region {
  background: var(--primary-10);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-35);
}

/* 다크모드: 라이트 페어 컬러로 전환하여 가독성 확보 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag-suite,
  :root:not([data-theme="light"]) .tag-refractive,
  :root:not([data-theme="light"]) .tag-region {
    background: rgba(255, 255, 255, 0.06);
    color: var(--secondary);
    border-color: var(--secondary-dark);
  }
}

[data-theme="dark"] .tag-suite,
[data-theme="dark"] .tag-refractive,
[data-theme="dark"] .tag-region {
  background: rgba(255, 255, 255, 0.06);
  color: var(--secondary);
  border-color: var(--secondary-dark);
}

/* ===== PRODUCT SECTION ===== */
.product-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.8rem 0 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.product-group { flex: 1; min-width: 200px; }

.product-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-group-title i { color: var(--primary); margin-right: 0.3rem; }
.product-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.timeline-content:hover { box-shadow: var(--shadow-hover); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-header h3 { font-size: 1.1rem; color: var(--text); }

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-on-primary);
  background: var(--primary);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  white-space: nowrap;
}

.timeline-company {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.timeline-company i { color: var(--primary); }

.company-logo {
  height: 22px;
  width: 22px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.company-logo-circle {
  height: 30px;
  width: 30px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--border);
  padding: 0;
}

.timeline-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  padding-left: 1rem;
  list-style: disc;
}

.timeline-desc li { margin-bottom: 0.3rem; }
.timeline-text { color: var(--text-light); font-size: 0.9rem; }

/* ===== REGION LIST ===== */
.region-list { display: flex; flex-direction: column; gap: 0.55rem; }

.region-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.region-period {
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  white-space: nowrap;
  font-weight: 500;
}

/* ===== AWARDS ===== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.award-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.award-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.award-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.award-icon.gold { background: linear-gradient(135deg, #f6d365, #fda085); color: white; }
.award-icon.blue { background: linear-gradient(135deg, var(--primary-light), var(--primary)); color: white; }

.award-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.award-info h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.award-org { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; font-weight: 500; }
.award-desc { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; }

/* ===== CONTACT ===== */
.contact-subtitle {
  text-align: center;
  color: var(--text-light-on-dark);
  margin-top: -2rem;
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }

.contact-item i { font-size: 1.5rem; color: var(--secondary); margin-top: 3px; }
.contact-item h4 {
  color: var(--text-on-dark);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-item p { color: var(--text-light-on-dark); }

.social-links { display: flex; gap: 1rem; margin-top: 1rem; }

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.social-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-3px);
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.42); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--secondary);
  background: rgba(255,255,255,0.13);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== KAKAO QR ===== */
.kakao-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.kakao-qr-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kakao-qr-label i { color: var(--accent); }

.kakao-qr-box {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  display: inline-block;
}

.kakao-qr-box img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.kakao-qr-desc {
  font-size: 0.88rem;
  color: var(--text-light-on-dark);
  text-align: center;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-footer);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  line-height: 2;
}

/* ===== THEME CONTROLS (팔레트 + 다크모드 스위처) ===== */
.theme-controls {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  font-family: inherit;
}

.palette-toggle-btn {
  background: var(--primary);
  color: var(--text-on-primary);
}

.darkmode-btn {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
  font-size: 1rem;
}

.theme-btn:hover { transform: scale(1.12); box-shadow: var(--shadow-hover); }

.palette-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-hover);
  display: none;
  min-width: 170px;
  animation: fadeUp 0.2s ease;
}

.palette-panel.open { display: block; }

.palette-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  margin-bottom: 0.7rem;
  text-align: center;
}

.palette-options { display: flex; flex-direction: column; gap: 0.35rem; }

.palette-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.82rem;
  color: var(--text);
  font-family: inherit;
  font-weight: 500;
  text-align: left;
}

.palette-option:hover { border-color: var(--border-strong); background: var(--bg-secondary); }
.palette-option.active { border-color: var(--primary); background: var(--primary-10); }

.swatch-pair { display: flex; gap: 3px; }

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
  .hero-buttons { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 400px; margin: 0 auto; }
  .info-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-scrolled-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    gap: 0;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    color: var(--text);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle { display: block; }
  .hero-name { font-size: 2.5rem; }
  .hero-photo { width: 180px; height: 180px; }
  .section { padding: 4rem 0; }
  .section-title { font-size: 1.8rem; }
  .timeline::before { left: 15px; }
  .timeline-item { padding-left: 45px; }
  .theme-controls { bottom: 1rem; right: 1rem; }
}
