/**
 * Theme Name: Minimal TCC Tech
 * Theme URI: 
 * Description: A minimal, Apple-inspired WordPress theme with dark mode support, left sidebar navigation, and collapsible menu items
 * Version: 1.0
 * Author: Nathan Courtney
 * Author URI:
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: minimal-tcc-tech
 */

/* CSS VARIABLES */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-sidebar: #fafafa;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --border-color: #d2d2d7;
  --accent: #0071e3;
  --hover-bg: #f5f5f7;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #1d1d1f;
  --bg-sidebar: #161617;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --border-color: #424245;
  --accent: #2997ff;
  --hover-bg: #1d1d1f;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

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

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, border-color 0.3s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background 0.2s ease;
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--hover-bg);
}

/* NAVIGATION */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu {
  list-style: none;
}

.menu-item {
  margin: 4px 0;
}

.menu-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  transition: background 0.2s ease;
}

.menu-item > a:hover {
  background: var(--hover-bg);
}

.menu-item.current-menu-item > a,
.menu-item.current_page_item > a {
  font-weight: 600;
  color: var(--accent);
}

/* SUBMENU */
.sub-menu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.menu-item.menu-item-has-children.open > .sub-menu {
  max-height: 500px;
}

.sub-menu .menu-item > a {
  padding: 8px 16px 8px 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.sub-menu .menu-item > a:hover {
  color: var(--text-primary);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  font-size: 12px;
}

.menu-item.open > a > .menu-toggle {
  transform: rotate(90deg);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 48px 64px;
  max-width: 1200px;
}

.content-wrapper {
  max-width: 800px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 36px; line-height: 1.2; }
h3 { font-size: 28px; line-height: 1.3; }

p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

a {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* POSTS */
.post {
  margin-bottom: 64px;
}

.post-title {
  margin-bottom: 8px;
}

.post-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.post-content {
  line-height: 1.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 24px;
  }
  
  .mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
  }
}