/* Cam Rao Portfolio - Shared Styles */

/* CSS Variables */
:root {
  --bg-primary: #f4e4cf;
  --bg-frame: #f8ecde;
  --border-frame: #cfbba4;
  --border-subtle: #e0cdb5;
  --text-primary: #2f1f1a;
  --text-secondary: #7b5a4b;
  --text-muted: #a17f68;
  --accent-primary: #dd745b;
  --accent-hover: #d7674b;
  --accent-border: #c68871;
  --btn-secondary: #f7ebe0;
  --btn-secondary-text: #8a6249;
  --shadow-sm: 0 4px 8px rgba(80, 45, 22, 0.12);
  --shadow-md: 0 8px 16px rgba(80, 45, 22, 0.15);
  --shadow-lg: 0 24px 40px rgba(80, 45, 22, 0.15);
  --shadow-accent: 0 6px 12px rgba(197, 103, 76, 0.45);
  --transition-quick: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Body & Background */
body {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(45deg, #f4e4cf 0%, #f8e9d5 25%, #f4e4cf 50%, #f0dfc7 75%, #f4e4cf 100%);
  background-size: 400% 400%;
  animation: psychedelicFlow 20s ease infinite;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(221, 116, 91, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(161, 127, 104, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(207, 187, 164, 0.03) 0%, transparent 50%);
  background-size: 80% 80%, 60% 60%, 100% 100%;
  animation: floatPattern 30s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* Animations */
@keyframes psychedelicFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes floatPattern {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  33% { transform: translate(30px, -30px) scale(1.1); opacity: 0.7; }
  66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.6; }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes logoFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Logo */
.site-logo {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 50px;
  height: 50px;
  z-index: 10000;
  opacity: 0;
  animation: logoFadeIn 0.8s ease 0.2s forwards;
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.site-logo:hover img {
  transform: scale(1.1);
}

/* Page Container */
.page {
  width: 100%;
  max-width: 1200px;
  padding: 50px 20px;
  animation: fadeIn 0.6s ease;
  position: relative;
  z-index: 2;
}

/* Header */
.top-header {
  text-align: center;
  margin-bottom: 32px;
  font-family: 'Reenie Beanie', cursive;
  font-size: 72px;
  color: #42251c;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.5s ease;
  line-height: 1;
}

/* Frame */
.frame {
  border-radius: 24px;
  border: 2px solid var(--border-frame);
  background: rgba(248, 236, 222, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  transition: box-shadow var(--transition-smooth);
}

.frame:hover {
  box-shadow: 0 28px 48px rgba(80, 45, 22, 0.18);
}

.frame-header {
  text-align: center;
  border-bottom: 1px solid var(--border-frame);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.frame-title {
  font-size: 28px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #42251c;
  font-weight: 600;
}

/* Navigation */
.nav-bar {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  animation: slideUp 0.6s ease 0.1s backwards;
}

.nav-btn,
.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d1b59a;
  background: var(--btn-secondary);
  color: var(--btn-secondary-text);
  padding: 10px 20px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-quick);
  cursor: pointer;
}

.nav-btn:hover,
.nav-link:hover {
  background: #f0ddc7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-btn:active,
.nav-link:active {
  transform: translateY(0);
}

.nav-btn.active,
.nav-link.active {
  background: var(--accent-primary);
  border-color: var(--accent-border);
  color: #fef9f4;
  box-shadow: var(--shadow-accent);
  cursor: default;
}

.nav-btn.active:hover,
.nav-link.active:hover {
  transform: none;
}

/* Focus States */
.nav-btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Responsive */
@media (max-width: 700px) {
  .site-logo {
    width: 45px;
    height: 45px;
    top: 12px;
    left: 12px;
  }

  .page {
    padding: 30px 16px;
  }

  .frame {
    padding: 24px;
  }

  .top-header {
    font-size: 56px;
    margin-bottom: 24px;
  }

  .frame-title {
    font-size: 22px;
  }

  .nav-btn,
  .nav-link {
    font-size: 9px;
    padding: 8px 16px;
  }
}
