/* ==========================================================================
   Design System & Theme Tokens (Moons.blog / Ultra-Clean Aesthetic)
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Bitter', Georgia, serif;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* Dark Theme Tokens (Default) */
[data-theme="dark"] {
  --bg-body: #0a0c10;
  --bg-surface: #12151e;
  --bg-surface-hover: #1a1e2b;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --accent-secondary: #f59e0b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(18, 21, 30, 0.75);
}

/* Light Theme Tokens */
[data-theme="light"] {
  --bg-body: #faf9f6;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f3f4f6;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --accent: #0284c7;
  --accent-glow: rgba(2, 132, 199, 0.1);
  --accent-secondary: #d97706;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Global Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent);
  border-radius: 50%;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

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

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

/* ==========================================================================
   Buttons & Pills
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-body);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
}

.btn-x {
  background-color: #ffffff;
  color: #000000;
  font-weight: 600;
}

.btn-x:hover {
  background-color: #e5e7eb;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding-top: 130px;
  padding-bottom: 80px;
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title .highlight {
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.role-pill {
  padding: 0.3rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-bio {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.25rem;
  max-width: 640px;
}

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

.hero-image-frame {
  margin-top: 3.5rem;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

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

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.image-caption .tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Section Base & About Section
   ========================================================================== */

.section {
  padding: 90px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-subtitle {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.bio-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.bio-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.bio-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.bio-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.quote-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portrait-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: sticky;
  top: 100px;
}

.portrait-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}

.portrait-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.portrait-info h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.portrait-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.portrait-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mini-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Work Section
   ========================================================================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.work-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.card-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.brand-logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 2px;
  flex-shrink: 0;
}

.brand-details h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.role-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.mini-social {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.mini-social:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.card-link:hover {
  gap: 0.6rem;
}

/* ==========================================================================
   X Spotlight Section
   ========================================================================== */

.x-spotlight-section {
  padding: 60px 0;
}

.x-card-container {
  background: #000000;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.x-graphic-bg {
  position: absolute;
  top: -20px;
  right: -40px;
  opacity: 0.08;
  pointer-events: none;
}

.x-logo-watermark {
  width: 450px;
  height: 450px;
}

.x-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.badge-dark {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.x-content h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.x-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #d1d5db;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Connect / Contact Section (Spacious 2-Column Grid)
   ========================================================================== */

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

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  transition: all var(--transition-fast);
}

.contact-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.contact-main-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.copy-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-surface-hover);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-name {
  font-weight: 600;
  color: var(--text-primary);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-primary);
  color: var(--bg-body);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .hero-title { font-size: 2.75rem; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait-card { position: static; }
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .site-nav.active {
    transform: translateY(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .x-card-container {
    padding: 2.5rem 1.5rem;
  }
}
