@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Space+Grotesk:wght@400;500;700;900&display=swap');

:root {
  --bg-newsprint: #f5f4ef;
  --bg-newsprint-darker: #eae9e3;
  --color-dark: #111111;
  --color-gray: #666666;
  --color-gray-light: #cccccc;
  --color-klein: #002fa7;
  --color-klein-light: #2a5dff;
  --color-klein-pale: #e6ecfc;
  --border-hairline: 1px solid var(--color-dark);
  --border-hairline-dotted: 1px dotted var(--color-dark);
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-brutalist: 4px 4px 0px var(--color-dark);
  --shadow-brutalist-hover: 8px 8px 0px var(--color-klein);
}

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

body {
  background-color: var(--bg-newsprint);
  color: var(--color-dark);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  overflow-x: hidden;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg-newsprint);
  border-left: var(--border-hairline);
}
::-webkit-scrollbar-thumb {
  background: var(--color-dark);
  border: 2px solid var(--bg-newsprint);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-klein);
}

/* Typography Utility */
.font-mono {
  font-family: 'Share Tech Mono', monospace;
}

/* Decorative grid pattern background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(17, 17, 17, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 17, 17, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: -1;
}

/* Base Grid Layout */
.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  border-left: var(--border-hairline);
  border-right: var(--border-hairline);
}

@media (min-width: 992px) {
  .grid-container {
    grid-template-columns: 280px 1fr;
  }
}

/* Sidebar Navigation */
.sidebar {
  border-bottom: var(--border-hairline);
  padding: 24px;
  background-color: var(--bg-newsprint);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: auto;
}

@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-bottom: none;
    border-right: var(--border-hairline);
    z-index: 10;
  }
}

.brand {
  margin-bottom: 48px;
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.brand-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-klein);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 700;
  padding: 8px 12px;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.nav-item a:hover {
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
  border: var(--border-hairline);
}

.nav-item.active a {
  background-color: var(--color-klein);
  color: #ffffff;
  border: var(--border-hairline);
}

.nav-num {
  font-size: 0.75rem;
  opacity: 0.6;
}

.sidebar-footer {
  margin-top: 48px;
  font-size: 0.8rem;
  color: var(--color-gray);
  border-top: var(--border-hairline-dotted);
  padding-top: 16px;
}

/* Main Area Container */
.main-content {
  display: flex;
  flex-direction: column;
}

/* Header Status Ticker */
.status-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-bottom: var(--border-hairline);
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
  font-size: 0.85rem;
}

.status-item {
  padding: 16px 24px;
  border-right: 1px solid rgba(245, 244, 239, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-item:last-child {
  border-right: none;
}

.status-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 1px;
  opacity: 0.7;
}

.status-val {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--color-klein-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-klein-light);
  display: inline-block;
  animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

/* Section Header */
.section-wrapper {
  border-bottom: var(--border-hairline);
  padding: 60px 24px;
  position: relative;
}

@media (min-width: 768px) {
  .section-wrapper {
    padding: 80px 48px;
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: var(--border-hairline);
  padding-bottom: 24px;
  margin-bottom: 40px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
}

.section-num {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--color-klein);
  margin-bottom: 4px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.section-desc {
  font-size: 1rem;
  color: var(--color-gray);
  max-width: 600px;
  margin-top: 8px;
}

/* Section 01: Hero & Bio */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-text {
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 500;
}

.hero-highlight {
  background-color: var(--color-klein);
  color: #ffffff;
  padding: 0 4px;
  font-weight: 700;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: var(--border-hairline);
  background-color: var(--bg-newsprint-darker);
  padding: 24px;
  position: relative;
}

.hero-stats::before {
  content: 'SYSTEM INFO';
  position: absolute;
  top: -10px;
  left: 16px;
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  padding: 2px 6px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: var(--border-hairline-dotted);
  padding-bottom: 8px;
  font-size: 0.9rem;
}

.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Section 02: Digital Builds (Projects) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  background: transparent;
  border: var(--border-hairline);
  padding: 8px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
}

.filter-btn.active {
  background-color: var(--color-klein);
  color: #ffffff;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background-color: var(--bg-newsprint);
  border: var(--border-hairline);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  box-shadow: var(--shadow-brutalist);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-brutalist-hover);
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-klein);
  border: 1px solid var(--color-klein);
  padding: 2px 8px;
  align-self: flex-start;
  margin-bottom: 16px;
}

.project-title {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 12px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-bottom: 24px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: var(--border-hairline-dotted);
  padding-top: 16px;
  margin-top: auto;
}

.project-tech {
  font-size: 0.8rem;
  opacity: 0.8;
}

.project-link {
  color: var(--color-dark);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
}

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

/* Section 04: Career Timeline */
.career-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .career-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.career-card {
  background-color: var(--bg-newsprint);
  border: var(--border-hairline);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.career-card:hover {
  background-color: var(--bg-newsprint-darker);
}

.career-main {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.career-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.career-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-klein);
  font-weight: 700;
}

.career-name {
  font-size: 1.2rem;
  font-weight: 900;
}

.career-toggle {
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.career-card.expanded .career-toggle {
  transform: rotate(180deg);
  color: var(--color-klein);
}

.career-details {
  max-height: 0;
  overflow: hidden;
  border-top: none;
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.career-card.expanded .career-details {
  max-height: 250px;
  border-top: var(--border-hairline);
  padding: 20px 24px;
}

.career-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.career-spec-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(245, 244, 239, 0.15);
  padding-bottom: 4px;
}

.career-spec-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Section 04: Travel Logs */
.travel-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.travel-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background-color: var(--color-dark);
  z-index: 1;
}

.travel-item {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

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

.travel-marker {
  width: 42px;
  height: 42px;
  border: var(--border-hairline);
  background-color: var(--bg-newsprint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.travel-item.active .travel-marker {
  background-color: var(--color-klein);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 47, 167, 0.3);
}

.travel-content {
  background-color: var(--bg-newsprint);
  border: var(--border-hairline);
  padding: 20px 24px;
  width: 100%;
  box-shadow: var(--shadow-brutalist);
  transition: var(--transition-medium);
}

.travel-item:hover .travel-content {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--color-dark);
}

.travel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: var(--border-hairline-dotted);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.travel-date {
  font-size: 0.8rem;
  color: var(--color-gray);
  font-weight: 700;
}

.travel-status {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 6px;
  border: var(--border-hairline);
}

.travel-item.active .travel-status {
  background-color: var(--color-klein-pale);
  color: var(--color-klein);
  border-color: var(--color-klein);
}

.travel-city {
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.travel-coords {
  font-size: 0.8rem;
  opacity: 0.8;
}

.travel-desc {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-top: 8px;
}

/* Section 05: Micro Technical Logs */
.log-stream {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.log-entry {
  background-color: var(--bg-newsprint-darker);
  border: var(--border-hairline);
  padding: 20px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.log-entry:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-brutalist);
  border-color: var(--color-klein);
  background-color: var(--bg-newsprint);
}

.log-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.log-stamp {
  font-weight: 700;
  color: var(--color-klein);
}

.log-tag {
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
  padding: 2px 6px;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.log-body {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Section 06: Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-methods {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-method-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.method-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-gray);
  font-weight: 700;
}

.method-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  text-decoration: none;
}

.method-val:hover {
  color: var(--color-klein);
}

.contact-form {
  border: var(--border-hairline);
  padding: 32px;
  background-color: var(--bg-newsprint);
  box-shadow: var(--shadow-brutalist);
}

.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px;
  border: var(--border-hairline);
  background-color: var(--bg-newsprint);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-klein);
  background-color: #ffffff;
  box-shadow: 2px 2px 0px var(--color-klein);
}

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

.submit-btn {
  background-color: var(--color-klein);
  color: #ffffff;
  border: var(--border-hairline);
  padding: 14px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 4px 4px 0px var(--color-dark);
}

.submit-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--color-dark);
  background-color: var(--color-klein-light);
}

.submit-btn:active {
  transform: translate(0px, 0px);
  box-shadow: 2px 2px 0px var(--color-dark);
}

.form-feedback {
  margin-top: 20px;
  padding: 16px;
  border: var(--border-hairline);
  background-color: #eafbe7;
  color: #1a5611;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  display: none;
}

.form-feedback.error {
  background-color: #fce7e7;
  color: #721c24;
}

/* Footnotes ASCII art decorative bar */
.decor-bar {
  border-bottom: var(--border-hairline);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  background-color: var(--bg-newsprint-darker);
}

/* Custom Modal or details panel styling if drawer is needed */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 17, 17, 0.4);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background-color: var(--bg-newsprint);
  border-left: var(--border-hairline);
  z-index: 101;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0px 0px rgba(17, 17, 17, 0.05);
}

.drawer-overlay.open .drawer {
  right: 0;
}

.drawer-close {
  background: transparent;
  border: var(--border-hairline);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 24px;
}

.drawer-close:hover {
  background-color: var(--color-dark);
  color: var(--bg-newsprint);
}

.drawer-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.drawer-title {
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 16px;
  border-bottom: var(--border-hairline);
  padding-bottom: 8px;
}

.drawer-body {
  font-size: 0.95rem;
  color: var(--color-dark);
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Global Mobile Controls (Hidden by Default) */
.mobile-header {
  display: none;
}
.sidebar-close {
  display: none;
}

/* Mobile Adaptation Styles (< 992px) */
@media (max-width: 991px) {
  /* Hide desktop-specific components on mobile */
  .status-bar {
    display: none !important;
  }

  /* Mobile Header */
  .mobile-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-newsprint);
    border-bottom: var(--border-hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 99;
  }
  
  .mobile-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .mobile-brand-title {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    text-transform: uppercase;
  }
  
  .mobile-brand-subtitle {
    font-size: 0.65rem;
    color: var(--color-klein);
    letter-spacing: 0.5px;
    margin-top: 2px;
  }
  
  .menu-toggle {
    background: transparent;
    border: var(--border-hairline);
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
  }
  
  .menu-toggle:hover {
    background-color: var(--color-dark);
    color: var(--bg-newsprint);
  }

  /* Sidebar as mobile drawer */
  .sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background-color: var(--bg-newsprint);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-left: var(--border-hairline);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 30px 20px;
  }
  
  .sidebar.open {
    right: 0;
  }
  
  .sidebar-close {
    display: block;
    align-self: flex-end;
    background: transparent;
    border: var(--border-hairline);
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 24px;
    transition: var(--transition-fast);
  }
  
  .sidebar-close:hover {
    background-color: var(--color-dark);
    color: var(--bg-newsprint);
  }

  /* Typography adjustments */
  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-text {
    font-size: 1.15rem;
    line-height: 1.4;
  }
  
  .section-wrapper {
    padding: 40px 16px;
  }

  /* Stats adaptation */
  .hero-stats {
    padding: 16px;
  }

  /* Form spacing */
  .contact-form {
    padding: 20px;
  }
}

/* Extra small mobile adjustments (< 576px) */
@media (max-width: 576px) {
  .drawer {
    max-width: 100%;
    right: -100%;
    border-left: none;
  }
  .drawer-overlay.open .drawer {
    right: 0;
  }
}
