/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: #f5f0e8;
  color: #3d362e;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #2a2520;
  color: #f5f0e8;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   HEADER & NAV
   ======================================== */

header {
  padding: 48px 0 32px;
  border-bottom: 1px solid #ddd5c8;
  margin-bottom: 48px;
}

nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  color: #9a8e80;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
}

nav a:hover {
  color: #2a2520;
}

nav a.nav-active {
  color: #1a1510;
}

.dark-mode-toggle {
  background: none;
  border: 1px solid #ddd5c8;
  border-radius: 4px;
  padding: 4px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a8e80;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.dark-mode-toggle:hover {
  color: #2a2520;
  border-color: #b5a898;
}

/* ========================================
   HERO
   ======================================== */

.hero {
  margin-bottom: 64px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.headshot {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #ddd5c8;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #1a1510;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero .subtitle {
  font-size: 1.05rem;
  color: #7a6e62;
  line-height: 1.7;
}

.hero .subtitle a {
  color: #4a3f34;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #c4b9a8;
  transition: all 0.2s ease;
}

.hero .subtitle a:hover {
  color: #1a1510;
  text-decoration-color: #1a1510;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  margin-bottom: 56px;
}

.section h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1510;
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.section p {
  color: #6b6058;
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.8;
}

.section .note {
  color: #9a8e80;
  font-size: 0.88rem;
  font-style: italic;
  margin-top: 16px;
}

/* ========================================
   LISTS
   ======================================== */

.section ul {
  list-style: none;
  padding: 0;
}

.section ul li {
  position: relative;
  padding: 8px 0 8px 20px;
  color: #6b6058;
  font-size: 0.95rem;
  border-bottom: 1px solid #e8e0d4;
  transition: all 0.2s ease;
}

.section ul li:last-child {
  border-bottom: none;
}

.section ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #c4b9a8;
  font-weight: bold;
}

.section ul li:hover {
  color: #3d362e;
}

.section ul li:hover::before {
  color: #1a1510;
}

.section ul li a {
  color: #3d362e;
  text-decoration: none;
  border-bottom: 1px solid #c4b9a8;
  padding-bottom: 1px;
  transition: all 0.2s ease;
}

.section ul li a:hover {
  color: #1a1510;
  border-bottom-color: #1a1510;
}

/* ========================================
   ACCORDION
   ======================================== */

.accordion {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.accordion-item {
  border: 1px solid #ddd5c8;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-item:hover {
  border-color: #c4b9a8;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #ede7dd;
  border: none;
  color: #4a3f34;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.accordion-toggle:hover {
  background: #e6dfd3;
  color: #1a1510;
}

.accordion-status {
  font-size: 0.65rem;
  color: #a99e90;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.accordion-item.active .accordion-status {
  color: #7a6e62;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 18px;
  background: #f0ebe2;
}

.accordion-item.active .accordion-content {
  max-height: 300px;
  padding: 16px 18px;
}

.accordion-content p {
  color: #7a6e62;
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0;
}

/* ========================================
   BLOCKQUOTES
   ======================================== */

.quotes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

blockquote {
  padding: 14px 20px;
  border-left: 3px solid #c4b9a8;
  background: #ede7dd;
  border-radius: 0 4px 4px 0;
  color: #6b6058;
  font-size: 0.93rem;
  font-style: italic;
  line-height: 1.7;
}

/* ========================================
   MEDIA GRID
   ======================================== */

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.media-grid img,
.media-grid video {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd5c8;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.media-grid img:hover,
.media-grid video:hover {
  transform: scale(1.02);
  border-color: #b5a898;
}

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

/* ========================================
   TECH GRID
   ======================================== */

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 14px;
  background: #ede7dd;
  border: 1px solid #ddd5c8;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #7a6e62;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  cursor: default;
}

.tech-tag:hover {
  border-color: #b5a898;
  color: #3d362e;
  background: #e6dfd3;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  border-top: 1px solid #ddd5c8;
  padding: 40px 0 60px;
  margin-top: 32px;
  text-align: center;
}

.back-to-top {
  display: inline-block;
  padding: 10px 24px;
  margin-bottom: 24px;
  background: #ede7dd;
  border: 1px solid #ddd5c8;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b6058;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  background: #e6dfd3;
  border-color: #b5a898;
  color: #1a1510;
}

footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #a99e90;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
  .container {
    padding: 0 18px;
  }

  header {
    padding: 32px 0 24px;
    margin-bottom: 36px;
  }

  nav {
    gap: 16px;
  }

  nav a {
    font-size: 0.7rem;
  }

  .hero {
    margin-bottom: 48px;
  }

  .hero-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 20px;
  }

  .headshot {
    width: 88px;
    height: 88px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section {
    margin-bottom: 44px;
  }

  .section ul li {
    font-size: 0.88rem;
  }

  .tech-grid {
    gap: 6px;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.hero,
.section,
footer {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.hero { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.15s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.25s; }
.section:nth-child(5) { animation-delay: 0.3s; }
.section:nth-child(6) { animation-delay: 0.35s; }
.section:nth-child(7) { animation-delay: 0.4s; }
.section:nth-child(8) { animation-delay: 0.45s; }
footer { animation-delay: 0.5s; }

/* ========================================
   DARK MODE
   ======================================== */

body.dark {
  background-color: #0a0a0a;
  color: #e0e0e0;
}

body.dark ::selection {
  background: #ffffff;
  color: #0a0a0a;
}

body.dark header {
  border-bottom-color: #1a1a1a;
}

body.dark nav a {
  color: #666;
}

body.dark nav a:hover {
  color: #fff;
}

body.dark nav a.nav-active {
  color: #fff;
}

body.dark .dark-mode-toggle {
  color: #666;
  border-color: #1a1a1a;
}

body.dark .dark-mode-toggle:hover {
  color: #fff;
  border-color: #333;
}

body.dark .hero h1 {
  color: #fff;
}

body.dark .hero .subtitle {
  color: #888;
}

body.dark .hero .subtitle a {
  color: #ccc;
  text-decoration-color: #444;
}

body.dark .hero .subtitle a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

body.dark .headshot {
  border-color: #1a1a1a;
}

body.dark .section h3 {
  color: #fff;
}

body.dark .section p {
  color: #999;
}

body.dark .section .note {
  color: #666;
}

body.dark .section ul li {
  color: #999;
  border-bottom-color: #141414;
}

body.dark .section ul li::before {
  color: #333;
}

body.dark .section ul li:hover {
  color: #ccc;
}

body.dark .section ul li:hover::before {
  color: #fff;
}

body.dark .section ul li a {
  color: #e0e0e0;
  border-bottom-color: #333;
}

body.dark .section ul li a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

body.dark .accordion-item {
  border-color: #1a1a1a;
}

body.dark .accordion-item:hover {
  border-color: #2a2a2a;
}

body.dark .accordion-toggle {
  background: #111;
  color: #ccc;
}

body.dark .accordion-toggle:hover {
  background: #161616;
  color: #fff;
}

body.dark .accordion-status {
  color: #555;
}

body.dark .accordion-item.active .accordion-status {
  color: #888;
}

body.dark .accordion-content {
  background: #0e0e0e;
}

body.dark .accordion-content p {
  color: #888;
}

body.dark .tech-tag {
  background: #141414;
  border-color: #1e1e1e;
  color: #888;
}

body.dark .tech-tag:hover {
  border-color: #333;
  color: #ccc;
  background: #1a1a1a;
}

body.dark .media-grid img,
body.dark .media-grid video {
  border-color: #1a1a1a;
}

body.dark .media-grid img:hover,
body.dark .media-grid video:hover {
  border-color: #333;
}

body.dark blockquote {
  border-left-color: #333;
  background: #111;
  color: #888;
}

body.dark footer {
  border-top-color: #1a1a1a;
}

body.dark footer p {
  color: #444;
}

body.dark .back-to-top {
  background: #141414;
  border-color: #1e1e1e;
  color: #888;
}

body.dark .back-to-top:hover {
  background: #1a1a1a;
  border-color: #333;
  color: #fff;
}
