/*** font ***/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Noto+Sans+KR:wght@300;400;500&family=Orbitron:wght@400;700&display=swap');

:root {
  --header-height: 64px;
  --clr-bg: #0a0a0a;
  --clr-accent: #c8a96e;
  --clr-accent2: #e0c88c;
  --clr-text: #f0ede8;
  --clr-muted: #888;
  --clr-border: rgba(200,169,110,0.2);
  --sidebar-w: 280px;
  --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Montserrat', sans-serif;
  font-size: 1em;
  background: var(--clr-bg);
  color: var(--clr-text);
  overflow-x: hidden;
}

/* ─── VIDEO BG ──────────────────────────────────────── */
#myVideo {
  position: fixed;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
  filter: brightness(55%) saturate(80%);
}

/* ─── HEADER ─────────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
}

#header.scrolled {
  background: rgba(6, 6, 6, 0.92);
}

/* logo */
.menu {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.menu img {
  height: clamp(16px, 3.5vw, 28px);
      width: auto;
  cursor: pointer;
  transition: opacity var(--transition), filter var(--transition);
  filter: brightness(0.9);
}
.menu img:hover {
  opacity: 0.7;
  filter: brightness(1.3) sepia(0.2);
}

/* header right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* DISCOVER button */
.openbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: var(--clr-text);
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.openbtn::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 10px;
  background: linear-gradient(
    to bottom,
    currentColor 0, currentColor 1.5px,
    transparent 1.5px, transparent 4.5px,
    currentColor 4.5px, currentColor 6px,
    transparent 6px, transparent 9px,
    currentColor 9px, currentColor 10.5px
  );
  flex-shrink: 0;
  opacity: 0.85;
}
.openbtn:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #111;
}

/* ─── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 200;
  top: 0; left: 0;
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.45s cubic-bezier(0.77,0,0.175,1);
  padding-top: 0;
  border-right: 1px solid rgba(255,255,255,0.05);
  z-index: 99999;
}

.sidebar-inner {
  padding: 90px 0 40px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar a {
  padding: 13px 32px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78em;
  letter-spacing: 0.08em;
  color: var(--clr-muted);
  display: block;
  transition: color 0.22s, padding-left 0.22s, background 0.22s;
  white-space: nowrap;
  border-left: 2px solid transparent;
}
.sidebar a:hover {
  color: var(--clr-accent2);
  padding-left: 42px;
  border-left-color: var(--clr-accent);
  background: rgba(200,169,110,0.06);
}

/* category label in sidebar */
.sidebar .sidebar-label {
  padding: 22px 32px 6px;
  font-size: 0.62em;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
  pointer-events: none;
  border: none;
}

.sidebar .closebtn {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 26px;
  font-weight: 200;
  color: var(--clr-muted) !important;
  padding: 6px 10px !important;
  border: none !important;
  border-left: none !important;
  background: transparent !important;
  transition: color 0.2s, transform 0.2s !important;
}
.sidebar .closebtn:hover {
  color: white !important;
  transform: rotate(90deg);
  padding-left: 10px !important;
}

/* sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* blink hover effect */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.blink-link:hover { animation: blink 0.2s step-start infinite; }

/* ─── MAIN LAYOUT SHIFT ──────────────────────────────── */
#main {
  transition: margin-left 0.45s cubic-bezier(0.77,0,0.175,1);
  display: flex;
  align-items: center;
}

/* ─── SWITCH TOGGLE ──────────────────────────────────── */
.top-switch-wrapper {
  position: fixed;
  top: 14px;
  right: 200px;
  z-index: 9999;
}

@media (max-width: 1199px) {
  .top-switch-wrapper {
    top: var(--header-height);
    right: auto;
    left: 0;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    background: rgba(6,6,6,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(200,169,110,0.15);
  }
}

.top-switch {
  position: relative;
  width: 220px;
  height: 36px;
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.06),
    inset 0 -2px 4px rgba(0,0,0,0.7),
    0 6px 20px rgba(0,0,0,0.5);
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}

.switch-indicator {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 6px);
  height: calc(100% - 6px);
  background: linear-gradient(145deg, #d4b97a, #a88840);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(200,169,110,0.45);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.switch-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  z-index: 2;
  transition: color 0.25s ease;
}
.switch-btn.active {
  color: #111;
  transform: translateY(0.5px);
}

/* ─── PATENT LABEL ───────────────────────────────────── */
.label-image2 {
  position: fixed;
  top: 0; right: 0;
  width: 160px;
  height: auto;
  z-index: 1000;
  opacity: 0.35;
  transition: opacity 0.5s var(--transition), transform 1.2s var(--transition);
  transform-origin: right top;
}
.label-image2:hover {
  opacity: 1;
  transform: scale(1.9);
  background-color: rgba(0,0,0,0.85);
}
@media (max-width: 1024px) { .label-image2 { display: none; } }

/* ─── PORTFOLIO GRID ─────────────────────────────────── */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: calc(var(--header-height) + 90px) 24px 60px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.column {
  width: 260px;
  flex-shrink: 0;
}

.content-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.content {
  background: rgba(10,10,10,0.65);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  text-align: center;
  color: var(--clr-text);
}

.content-link:hover .content {
  background: rgba(0,0,0,0.88);
  border-color: rgba(200,169,110,0.35);
  transform: translateY(-3px);
}

.image-container {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.content-link:hover .content img {
  transform: scale(1.12);
}

.content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text);
  padding: 14px 12px 6px;
  transition: color 0.3s;
}
.content-link:hover .content h2 {
  color: var(--clr-accent2);
}

.content p {
  font-size: 0.7em;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  padding: 0 14px 16px;
  line-height: 1.65;
  transition: color 0.3s;
}
.content-link:hover .content p {
  color: rgba(255,255,255,0.75);
}

/* ─── GO TOP ─────────────────────────────────────────── */
.go_top_area {
  position: fixed;
  bottom: 36px;
  right: 22px;
  display: none;
  z-index: 20;
}
.go_top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(20,20,20,0.85);
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  color: var(--clr-accent);
  text-decoration: none;
  font-size: 18px;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}
.go_top:hover {
  background: var(--clr-accent);
  color: #111;
  border-color: var(--clr-accent);
  transform: translateY(-3px);
}
.go_top h3 { font-weight: 300; font-size: 16px; margin: 0; }

/* ─── FOOTER ─────────────────────────────────────────── */
footer.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--clr-border);
  padding: 52px 48px 32px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand img {
  height: 28px;
  width: auto;
  opacity: 0.85;
  margin-bottom: 14px;
  filter: brightness(0.9);
}

.footer-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68em;
  letter-spacing: 0.14em;
  color: var(--clr-muted);
  text-transform: uppercase;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 0.75em;
  color: var(--clr-muted);
  text-decoration: none;
  margin-bottom: 9px;
  letter-spacing: 0.03em;
  transition: color 0.2s, transform 0.2s;
}
.footer-col a:hover {
  color: var(--clr-text);
  transform: translateX(3px);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.65em;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.8;
}

.footer-contact {
  font-size: 0.65em;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.05em;
  font-family: 'Montserrat', sans-serif;
}

.footer-contact a {
  color: var(--clr-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--clr-accent); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
/* 1200px 미만: 스위치 바 높이만큼 상단 패딩 보정 */
@media (max-width: 1199px) {
  .container {
    padding-top: calc(var(--header-height) + 58px + 80px);
  }
}

@media (max-width: 768px) {
  #header { padding: 0 16px; }
  .column { width: calc(50vw - 28px); min-width: 140px; }
  .container { padding: calc(var(--header-height) + 58px + 60px) 12px 40px; gap: 10px; }
  .row { gap: 10px; }
  .content h2 { font-size: 0.72em; padding: 10px 8px 4px; }
  .content p { font-size: 0.62em; padding: 0 8px 12px; }

  footer.site-footer { padding: 36px 20px 24px; }
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-links { gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .column { width: 220px; }
}

@media (min-width: 1200px) {
  .column { width: 260px; }
}

@media (min-width: 1600px) {
  .column { width: 300px; }
}

@media (min-width: 1920px) {
  .column { width: 340px; }
}

/* ─── MISC ───────────────────────────────────────────── */
h1 { font-size: 2.8rem; word-break: break-all; }

/* colorTransition kept for compatibility */
@keyframes colorTransition {
  0% { color: white; }
  30% { color: #c8a96e; }
  100% { color: var(--clr-accent2); }
}
