@font-face {
  font-family: 'Antipol';
  src: url('fonts/Antipol-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Akkurat';
  src: url('fonts/Akkurat.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --color-bg: #F5F0E8;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4a4a;
  --color-accent: #C96442;
  --color-border: #ddd5c9;
  --font-heading: 'Antipol', sans-serif;
  --font-body: 'Akkurat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-width: 200px;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ==================== LAYOUT ==================== */
.site-layout {
  display: flex;
  min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.2;
  margin-bottom: 40px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.sidebar-nav-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
  transition: color 0.15s ease;
  text-decoration: none;
}

.sidebar-nav-btn:hover {
  color: var(--color-text);
}

.sidebar-nav-btn.active {
  color: var(--color-text);
  font-weight: 600;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sidebar-social {
  display: flex;
  gap: 8px;
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.sidebar-icon:hover {
  color: var(--color-text);
}

.sidebar-cta {
  display: inline-block;
  width: 100%;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
  text-align: center;
}

.sidebar-cta:hover {
  opacity: 0.85;
}

.sidebar-footer {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.content-container {
  max-width: 640px;
  padding: 40px 40px 80px;
  animation: panelFadeIn 250ms ease both;
}

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

/* ==================== ABOUT SECTIONS ==================== */
.about-section {
  padding: 48px 0;
}

.about-section:first-child {
  padding-top: 0;
}

.question {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-section.visible .question {
  opacity: 1;
  transform: translateY(0);
}

.answer {
  color: var(--color-text-muted);
  font-size: 17px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.about-section.visible .answer {
  opacity: 1;
  transform: translateY(0);
}

.answer p {
  margin-bottom: 1.5em;
}

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

.answer strong {
  color: var(--color-text);
  font-weight: 600;
}

.answer a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.answer a:hover {
  opacity: 0.7;
}

/* ==================== INFLECTION POINTS ==================== */
.inflection-list {
  margin-top: 24px;
}

.inflection-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.inflection-item:first-child {
  border-top: 1px solid var(--color-border);
}

.inflection-name {
  font-weight: 600;
  min-width: 160px;
  color: var(--color-text);
}

.inflection-desc {
  color: var(--color-text-muted);
  text-align: right;
}

/* ==================== DIFFERENTIATORS ==================== */
.diff-item {
  margin-bottom: 32px;
}

.diff-item:last-child {
  margin-bottom: 0;
}

.diff-title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

/* ==================== PROJECT SHOWCASE ==================== */
.project-showcase {
  margin-top: 40px;
}

.project-showcase-item {
  margin-bottom: 56px;
}

.project-showcase-item:last-child {
  margin-bottom: 0;
}

.project-screenshot {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  background: var(--color-border);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-screenshot:hover {
  transform: scale(1.02);
}

.project-showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  margin-bottom: 6px;
}

.project-showcase-link:hover {
  color: var(--color-text);
}

.project-showcase-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.project-showcase-link:hover svg {
  transform: translate(3px, -3px);
}

.project-showcase-desc {
  font-size: 17px;
  color: var(--color-text);
  line-height: 1.6;
}

.projects-hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ==================== AI CHAT CTA ==================== */
.ai-chat-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ai-chat-btn:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
  opacity: 1;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: var(--font-body);
}

.copy-btn:hover {
  opacity: 0.85;
}

.copy-btn.copied {
  background: #22c55e;
}

.ai-prompt-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.ai-prompt {
  font-size: 13px;
  color: var(--color-text-muted);
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  font-family: monospace;
}

/* ==================== PANEL TITLES (Projects / Contact) ==================== */
.panel-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--color-text);
}

.panel-intro {
  color: var(--color-text-muted);
  font-size: 17px;
  margin-bottom: 8px;
}

/* ==================== TAMAGOTCHI ==================== */
.hero-tamagotchi {
  position: fixed;
  top: -50px;
  right: 5%;
  width: 280px;
  height: auto;
  z-index: 101;
  pointer-events: none;
  transform-origin: top center;
  animation: swing 4s ease-in-out infinite;
}

@keyframes swing {
  0%, 100% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
}

@media (max-width: 1024px) {
  .hero-tamagotchi {
    display: none;
  }
}

/* ==================== CURSOR FOLLOWER ==================== */
.cursor-follower {
  position: fixed;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor-follower img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cursor-follower.visible {
  opacity: 1;
}

@media (max-width: 1024px) {
  .cursor-follower {
    display: none !important;
  }
}

/* ==================== MOBILE HEADER (replaces sidebar) ==================== */
.mobile-header {
  display: none;
}

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--color-text);
    text-decoration: none;
  }

  .mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
  }

  .mobile-nav {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 99;
  }

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

  .mobile-nav-tamagotchi {
    display: none;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: auto;
    pointer-events: none;
    transform-origin: top center;
    animation: swing-centered 4s ease-in-out infinite;
  }

  @keyframes swing-centered {
    0%, 100% { transform: translateX(-50%) rotate(2deg); }
    50% { transform: translateX(-50%) rotate(-2deg); }
  }

  .mobile-nav.open .mobile-nav-tamagotchi {
    display: block;
  }

  .mobile-menu-toggle {
    z-index: 101;
  }

  .mobile-nav-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 16px 0;
    text-align: center;
    transition: color 0.15s ease;
    text-decoration: none;
    display: block;
  }

  .mobile-nav-btn.active {
    color: var(--color-text);
  }

  .mobile-nav-btn.active::before {
    content: '·';
    margin-right: 10px;
  }

  .mobile-nav-btn.active::after {
    content: '·';
    margin-left: 10px;
  }

  .mobile-nav-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
  }

  .mobile-nav-social {
    display: flex;
    gap: 16px;
  }

  .mobile-nav-bottom .sidebar-cta {
    width: auto;
    padding: 10px 32px;
  }

  .main-content {
    margin-left: 0;
  }

  .content-container {
    padding: 32px 20px 60px;
  }

  .inflection-item {
    flex-direction: column;
    gap: 4px;
  }

  .inflection-name {
    min-width: auto;
  }

  .inflection-desc {
    text-align: left;
  }

  /* Disable fade-in on mobile */
  .question,
  .answer {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .question {
    font-size: clamp(22px, 5vw, 28px);
  }

  .ai-prompt-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ai-prompt {
    font-size: 12px;
    padding: 10px 12px;
    text-align: center;
  }

  .copy-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }

  .ai-chat-cta .ai-chat-btn {
    padding: 12px 16px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
  }
}
