/* ==========================================================================
   Miguel Rosa Portfolio - Style System
   Typography: Roboto & Roboto Mono
   Theme: Light / Dark via CSS Variables
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Theme Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'Roboto Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Theme Variables (Warm Linen & Burnt Bronze Palette) */
:root {
  --bg-body: #faf8f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f1ea;
  --bg-card-subtle: #f7f3ec;
  --bg-nav: rgba(250, 248, 245, 0.88);
  --bg-input: #fbf9f6;
  --bg-code: #f3efe6;
  --bg-badge: #fef3c7;
  --text-badge: #92400e;

  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-faint: #a8a29e;
  --text-inverse: #ffffff;

  --primary: #b45309;
  --primary-hover: #92400e;
  --primary-subtle: rgba(180, 83, 9, 0.1);
  --accent: #d97706;
  --accent-glow: rgba(217, 119, 6, 0.22);

  --border: #e7e2d9;
  --border-focus: #b45309;

  --shadow-sm: 0 1px 2px 0 rgba(28, 25, 23, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.07), 0 2px 4px -2px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(28, 25, 23, 0.08), 0 4px 6px -4px rgba(28, 25, 23, 0.03);
  --shadow-glow: 0 0 20px rgba(180, 83, 9, 0.18);

  --success: #059669;
  --error: #dc2626;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-role {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-card-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

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

.nav-tab-btn.active {
  color: var(--text-inverse);
  background-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.mobile-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-nav-tab-btn.active {
  color: var(--primary);
  background: var(--primary-subtle);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Main Content Views
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.tab-view {
  animation: fadeIn var(--transition-normal) ease-in-out;
}

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

/* --------------------------------------------------------------------------
   About Me View
   -------------------------------------------------------------------------- */
.hero-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4.75rem;
  align-items: center;
  padding: 2.5rem 0 3.5rem;
}

.hero-text {
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-badge);
  color: var(--text-badge);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-primary-actions,
.hero-social-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Hero Avatar */
.hero-avatar-wrapper {
  position: relative;
}

.hero-avatar-glow {
  position: absolute;
  inset: -10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.4;
  z-index: 0;
  transition: opacity var(--transition-normal);
}

.hero-avatar-wrapper:hover .hero-avatar-glow {
  opacity: 0.65;
}

.hero-avatar {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 0%;
  border: none;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  transition: transform var(--transition-normal);
}

.hero-avatar-wrapper:hover .hero-avatar {
  transform: scale(1.02);
}

/* Quick Info Badges Bar */
.quick-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.quick-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.quick-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-subtle);
  color: var(--primary);
  flex-shrink: 0;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.info-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Section Titles */
.section-header {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-fast);
}

.skill-category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.category-icon {
  color: var(--primary);
}

.category-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Experience Timeline */
.experience-timeline {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 4rem;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  z-index: 1;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-fast);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-role-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.timeline-brand-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.timeline-brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-company {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.timeline-body {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.timeline-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.timeline-body li {
  margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   Blog View
   -------------------------------------------------------------------------- */
.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.tag-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Coming Soon Banner */
.coming-soon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  max-width: 680px;
  margin: 1.5rem auto 3rem;
  animation: fadeIn var(--transition-normal) ease-in-out;
}

.coming-soon-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.coming-soon-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.coming-soon-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.coming-soon-topics {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  height: 100%;
}

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

.post-card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.post-card:hover .post-card-title {
  color: var(--primary);
}

.post-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-faint);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.post-card-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Post Reader View */
.post-reader-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  animation: fadeIn var(--transition-normal) ease-in-out;
}

.reader-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.reader-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.reader-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Markdown Content Styling (Prose) */
.markdown-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--text-main);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.markdown-body h1 { font-size: 1.85rem; }
.markdown-body h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.markdown-body h3 { font-size: 1.25rem; }

.markdown-body p {
  margin-bottom: 1.25rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
}

.markdown-body blockquote {
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--primary);
  background: var(--bg-card-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.markdown-body pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-card-subtle);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  border: none;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.markdown-body th,
.markdown-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-body th {
  background: var(--bg-card-subtle);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Contact View
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-card-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

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

.contact-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-text {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}

.contact-item-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.contact-item-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-item-sub {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Honeypot field (hidden from genuine users) */
.hp-field {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
  pointer-events: none;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInUp var(--transition-fast) ease-out;
}

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

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

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

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

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 2rem;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-primary-actions,
  .hero-social-actions {
    justify-content: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .nav-tabs {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-nav-drawer {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.15rem;
  }

  .hero-avatar {
    width: 200px;
    height: 200px;
  }

  .post-reader-wrapper {
    padding: 1.5rem;
  }

  .reader-title {
    font-size: 1.75rem;
  }

  .contact-card-info,
  .contact-form-card {
    padding: 1.5rem 1.25rem;
  }

  .contact-item {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .contact-item-icon {
    width: 40px;
    height: 40px;
  }

  .contact-item-val {
    font-size: 0.82rem;
  }

  .form-input,
  .form-textarea {
    font-size: 16px; /* Prevents auto-zoom on iOS */
  }

  .contact-form-card .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 440px) {
  .contact-card-info,
  .contact-form-card {
    padding: 1.25rem 0.85rem;
  }

  .contact-item {
    padding: 0.75rem 0.75rem;
    gap: 0.6rem;
  }

  .contact-item-icon {
    width: 36px;
    height: 36px;
  }

  .contact-item-label {
    font-size: 0.7rem;
  }

  .contact-item-val {
    font-size: 0.76rem;
  }

  .contact-item-sub {
    font-size: 0.82rem;
  }

  .contact-item .btn-sm {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
  }
}
