/* CSS Reset & Variables - Björk-inspired Design */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Light mode (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f3f2f2;
  --text-primary: #111111;
  --text-secondary: #6b6a6a;
  --accent: #5857ff;
  --accent-hover: #4847cc;
  --border: #e2e2e2;

  /* Typography */
  --font-sans: "Albert Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: clamp(2rem, 5vw, 4rem);
  --body-gutter: clamp(2rem, 5vw, 4rem);

  /* Layout */
  --sidebar-width: 280px;
  --content-max-width: 720px;

  /* Transitions */
  --transition: 150ms ease;
}

[data-theme="dark"] {
  --bg-primary: #111111;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #7877ff;
  --accent-hover: #9998ff;
  --border: #333333;
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(17px, 2.5vw, 21px);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--transition);
}

a:hover {
  text-decoration: none;
}

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

/* Layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: var(--body-gutter);
}

@media (min-width: 782px) {
  .site-wrapper {
    flex-direction: row;
    gap: var(--space-xl);
  }
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-lg);
}

@media (min-width: 782px) {
  .sidebar {
    position: sticky;
    top: var(--body-gutter);
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: calc(100vh - var(--body-gutter) * 2);
    padding-bottom: 0;
  }
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-sm);
}

.site-logo {
  font-weight: 600;
  font-size: clamp(18px, 2vw, 21px);
  text-decoration: none;
  margin-bottom: var(--space-lg);
}

.site-logo:hover {
  text-decoration: none;
}

/* Navigation */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

@media (min-width: 782px) {
  .nav-links {
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: 0;
  }
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  text-decoration: underline;
}

/* Bottom Links */
.bottom-links {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  margin-top: auto;
  flex-wrap: wrap;
}

@media (min-width: 782px) {
  .bottom-links {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

.bottom-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 500;
  transition: color var(--transition);
}

.bottom-links a:hover {
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-primary);
  transition: opacity var(--transition);
}

.theme-toggle:hover {
  opacity: 0.6;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

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

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
  display: block;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  max-width: var(--content-max-width);
}

@media (min-width: 782px) {
  .main-content {
    padding-top: 0;
  }
}

/* Hero Section (Home Page) */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--body-gutter) * 2);
}

@media (max-width: 781px) {
  .hero {
    min-height: auto;
    padding: var(--space-xl) 0;
  }
}

.hero-greeting {
  font-size: clamp(17px, 2.5vw, 21px);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-weight: 500;
  height: 1.5em;
  overflow: hidden;
}

.greeting-text {
  display: inline-block;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.greeting-text.fade-out {
  opacity: 0;
}

.hero-headline {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--wp--preset--font-size--small, 18px);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.15;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Page Content */
.page-content {
  padding: var(--space-xl) 0;
}

.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: clamp(17px, 2.5vw, 21px);
}

.page-meta {
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 16px);
  margin-top: var(--space-xs);
}

/* Content Sections */
.section {
  margin-bottom: var(--space-xl);
}

/* Hero Photo - Large image at top */
.hero-photo {
  margin-bottom: var(--space-xl);
}

.hero-photo img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  object-fit: cover;
}

.section-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.section p:last-child {
  margin-bottom: 0;
}

.section p strong {
  color: var(--text-primary);
}

/* Now Page Lists */
.now-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.now-item {
  padding-left: var(--space-md);
  border-left: 1px solid var(--border);
  transition: border-color var(--transition);
}

.now-item:hover {
  border-color: var(--accent);
}

.now-item h3 {
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.now-item p {
  color: var(--text-secondary);
  font-size: clamp(16px, 2vw, 18px);
  margin: 0;
}

/* Simple Now List */
.now-simple {
  list-style: disc;
  list-style-position: outside;
  padding-left: 1.25em;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.now-simple li {
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.5;
}

.now-simple li::marker {
  color: var(--text-secondary);
}

.now-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-secondary);
}

.now-footer p {
  margin-bottom: var(--space-xs);
}

/* Links in content */
.content-link {
  color: var(--accent);
}

.content-link:hover {
  text-decoration: underline;
}

/* Footer (mobile only) */
.mobile-footer {
  display: block;
  padding-top: var(--space-xl);
  margin-top: auto;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 16px);
}

@media (min-width: 782px) {
  .mobile-footer {
    display: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .sidebar {
    display: none;
  }
  .site-wrapper {
    display: block;
  }
}
