/* ==========================================
   Norman Lu - Portfolio Website Styles
   Simple, clean CSS for easy maintenance
   ========================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=PT+Sans:wght@400;700&display=swap');

/* ==========================================
   CSS Variables (Easy to customize!)
   ========================================== */
:root {
  /* Colors - Change these to customize your site */
  --primary-color: #2c5f2d;
  --primary-dark: #1e4620;
  --accent-color: #97bf0d;
  --background: #ffffff;
  --text-color: #1a1a1a;
  --text-muted: #666666;
  --border-color: #e5e5e5;
  --card-background: #fafafa;

  /* Fonts */
  --font-headline: 'Playfair Display', serif;
  --font-body: 'PT Sans', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Border radius */
  --radius: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background: var(--background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

p {
  margin-bottom: var(--spacing-sm);
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

/* ==========================================
   Layout Components
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

main {
  flex: 1;
  padding: var(--spacing-lg) 0;
}

.section {
  margin-bottom: var(--spacing-xl);
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==========================================
   Header & Navigation
   ========================================== */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--spacing-sm) 0;
}

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

.logo {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

nav a {
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
  background: rgba(44, 95, 45, 0.05);
}

.btn-contact {
  background: var(--primary-color);
  color: white !important;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-md);
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  nav a {
    display: block;
    padding: var(--spacing-sm);
  }
}

/* ==========================================
   Footer
   ========================================== */
footer {
  background: var(--card-background);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-lg) 0;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  list-style: none;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm) var(--spacing-md);
  list-style: none;
  margin-bottom: var(--spacing-md);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================
   Cards
   ========================================== */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
}

.card-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.card-content {
  margin-bottom: var(--spacing-sm);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

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

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

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

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

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

.btn-secondary:hover {
  background: #7a9a0a;
}

.btn-lg {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1.1rem;
}

/* ==========================================
   Hero Section (Home Page)
   ========================================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: var(--spacing-md);
  animation: fadeInUp 1s ease;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

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

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
}

/* ==========================================
   Forms
   ========================================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.form-error {
  color: #dc2626;
  font-size: 0.9rem;
  margin-top: var(--spacing-xs);
}

/* ==========================================
   Tags/Badges
   ========================================== */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--spacing-sm);
}

/* ==========================================
   About Page Specific
   ========================================== */
.about-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

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

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.influences-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
}

.influence-link {
  background: var(--card-background);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 999px;
  color: var(--primary-color);
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.influence-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ==========================================
   News/Blog Listing
   ========================================== */
.news-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: white;
  margin-bottom: var(--spacing-md);
  transition: all 0.3s ease;
}

.news-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.news-item-image {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
  }

  .news-item-image {
    width: 100%;
    height: 200px;
  }
}

.news-content h3 {
  margin-bottom: var(--spacing-xs);
}

/* ==========================================
   Article/Page Content
   ========================================== */
.article-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.article-banner {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

.article-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content h2 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.article-content h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.article-content p {
  margin-bottom: var(--spacing-md);
}

.article-content ul,
.article-content ol {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.article-content li {
  margin-bottom: var(--spacing-xs);
}

/* ==========================================
   Utility Classes
   ========================================== */
.separator {
  height: 1px;
  background: var(--border-color);
  margin: var(--spacing-xl) 0;
}

.spacer-sm { margin-top: var(--spacing-sm); }
.spacer-md { margin-top: var(--spacing-md); }
.spacer-lg { margin-top: var(--spacing-lg); }
.spacer-xl { margin-top: var(--spacing-xl); }

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
}

.icon-lg {
  width: 3rem;
  height: 3rem;
}

.bg-light {
  background: var(--card-background);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
}

/* ==========================================
   Responsive Utilities
   ========================================== */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
  header, footer, .btn {
    display: none;
  }

  body {
    font-size: 12pt;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}
