body {
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-weight: 500;
  margin: 0;
  padding: 0;
  max-width: 1000px;
  margin: 0 auto;
  position: relative; /* so we can position elements like the cat relative to body */
  background-color: #000000;
  color: #ffffff;
  overflow-x: hidden; /* prevent horizontal scrolling */
}

/* Theme colors */
:root {
  --primary-green: #00f900;
  --accent-green: #00cc00;
  --dark-green: #008800;
  --white: #ffffff;
  --black: #000000;
  --gray: #333333;
  --light-gray: #666666;
}

.header {
  display: flex;
  align-items: flex-end; /* align bottom of elements */
  justify-content: space-between;
  margin: 20px;
  flex-wrap: nowrap; /* prevent wrapping */
}

.header h1 {
  white-space: nowrap; /* keep name on one line */
  margin: 0;
}

.first-name {
  font-family: 'Goldman', sans-serif;
  font-size: 60px;
  text-transform: lowercase;
  color: var(--primary-green);
}

.last-name {
  font-family: 'Audiowide', cursive;
  font-size: 24px;
  text-transform: lowercase;
  color: var(--white);
}

.ascii-bar {
  font-family: monospace;
  font-size: 12px;
  color: var(--light-gray);
  /* pre tag is used, so whitespace is preserved by default */
  margin-right: 20px;
  line-height: 1.2;
  overflow-x: hidden;
  display: block;
  max-width: 100%;
}

.ascii-bar a {
  text-decoration: none;
  color: var(--light-gray) !important;
  border-bottom: none !important;
  transition: color 0.3s ease;
}

.ascii-bar a:hover {
  color: var(--primary-green) !important;
  text-decoration: underline !important;
}

.section {
  margin: 80px 0;
}

.section-title {
  font-family: 'Goldman', sans-serif;
  font-size: 30px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--primary-green);
}

p a {
  color: var(--primary-green);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-green);
  transition: all 0.3s ease;
}

p a:hover {
  color: var(--accent-green);
  border-bottom: 1px solid var(--accent-green);
  font-weight: bold;
}

.profile-image {
  width: 400px;
  height: 350px;
  max-width: 100%;
  object-fit: cover;
  border: 2px dashed var(--primary-green);
  margin-left: 20px;
}

#about-me {
  display: flex;
  margin: 0 20px;
}

#about-me .text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  padding: 12px;
  padding-left: 60px;
}

.indented-quote {
  margin: 6px 0;
  padding: 0 0 0 32px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--primary-green);
  font-style: italic;
}

/* Generic timeline-like list for life updates */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px 20px 0 10px;
  display: grid;
  grid-template-columns: 160px 160px 160px 160px 160px auto;
  grid-auto-rows: 32px;
  gap: 0 10px;
}

.timeline-labels {
  /* months/years stack in a single column next to the line */
}

.timeline-item {
  display: flex;
  margin: 20px 0;
  align-items: flex-start;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  background: var(--primary-green);
  border-radius: 50%;
  margin-right: 16px;
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-content strong {
  color: var(--primary-green);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 18px;
  bottom: 0;
  border-left: 2px solid var(--primary-green);
}

.timeline::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 6px;
  border-bottom: 8px solid var(--primary-green);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.timeline-year {
  grid-column: 6;
  align-self: center;
  margin: 6px 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-green);
}

.timeline-month {
  grid-column: 6;
  align-self: center;
  margin: 4px 0 0 18px;
  font-size: 11px;
  color: var(--primary-green);
}

.experience-box {
  grid-column: 5; /* default: rightmost column next to axis */
  border: 1px solid var(--gray);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  background: #050505;
}

.experience-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.experience-dates {
  color: var(--light-gray);
  margin-bottom: 4px;
}

.experience-box p {
  margin: 0;
}

.experience-box a {
  color: var(--primary-green);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-green);
}

.experience-box a:hover {
  color: var(--accent-green);
  border-bottom: 1px solid var(--accent-green);
}

/* Duration-based heights (very rough proportional mapping) */
.duration-xs { /* ~1–2 months */
  min-height: 36px;
}

.duration-s { /* ~3–4 months */
  min-height: 48px;
}

.duration-m { /* ~5–8 months */
  min-height: 72px;
}

.duration-l { /* ~9–18 months */
  min-height: 110px;
}

.duration-xl { /* >18 months */
  min-height: 150px;
}

/* Experience placement based on column-packing algorithm */
/* Columns: 5=closest to axis, 4,3,2,1=progressively left, 6=axis labels */

/* Column 5 (closest to axis): UGS, Robotics Lab, Mako */
.exp-ugs {
  grid-column: 5;
  grid-row: 2 / span 80; /* Jun 2018 – Jan 2025 */
}

.exp-robotics-lab {
  grid-column: 5;
  grid-row: 10 / span 4; /* Feb–May 2025 */
}

.exp-mako {
  grid-column: 5;
  grid-row: 3 / span 4; /* Sep–Dec 2025 */
}

/* Column 4: CHCKR, Reply.io, Plant Growth, Ukrainian GEC, NLP Lab, Flutter, Robotics Startup, Trot or Rot, Cache Me Out, PaperTrail */
.exp-chckr {
  grid-column: 4;
  grid-row: 68 / span 3; /* Jun–Aug 2020 */
}

.exp-reply-io {
  grid-column: 4;
  grid-row: 58 / span 3; /* Jun–Aug 2021 */
}

.exp-plant-growth {
  grid-column: 4;
  grid-row: 40 / span 1; /* Feb 2023 */
}

.exp-ukrainian-gec {
  grid-column: 4;
  grid-row: 37 / span 1; /* May 2023 */
}

.exp-nlp-lab {
  grid-column: 4;
  grid-row: 30 / span 7; /* Jun–Dec 2023 */
}

.exp-flutter {
  grid-column: 4;
  grid-row: 27 / span 1; /* Jan 2024 */
}

.exp-robotics-startup {
  grid-column: 4;
  grid-row: 20 / span 6; /* Mar–Aug 2024 */
}

.exp-trot-or-rot {
  grid-column: 4;
  grid-row: 17 / span 4; /* Sep–Dec 2024 */
}

.exp-cache-me-out {
  grid-column: 4;
  grid-row: 11 / span 3; /* Mar–May 2025 */
}

.exp-papertrail {
  grid-column: 4;
  grid-row: 4 / span 3; /* Oct 2025–present */
}

/* Column 3: Pravopysnyk, Neo Scholar, Notion, Telegram Wrapped */
.exp-pravopysnyk {
  grid-column: 3;
  grid-row: 19 / span 49; /* Aug 2020 – Aug 2024 */
}

.exp-neo {
  grid-column: 3;
  grid-row: 18 / span 1; /* Oct 2024 */
}

.exp-notion {
  grid-column: 3;
  grid-row: 7 / span 4; /* May–Aug 2025 */
}

.exp-telegram-wrapped {
  grid-column: 3;
  grid-row: 4 / span 3; /* Oct 2025–present */
}

/* Column 2: Math Modelling, CV Lab, EraseDraw */
.exp-math-modeling {
  grid-column: 2;
  grid-row: 33 / span 7; /* Feb–Aug 2023 */
}

.exp-cv-lab {
  grid-column: 2;
  grid-row: 24 / span 8; /* Sep 2023 – Apr 2024 */
}

.exp-erasedraw {
  grid-column: 2;
  grid-row: 22 / span 1; /* Jun 2024 */
}

/* Column 1 (farthest left): INSIGHT, Giraffe.study, FPGA MP3 */
.exp-insight {
  grid-column: 1;
  grid-row: 35 / span 3; /* Jun–Aug 2023 */
}

.exp-giraffe {
  grid-column: 1;
  grid-row: 31 / span 1; /* Oct 2023 */
}

.exp-fpga-mp3 {
  grid-column: 1;
  grid-row: 23 / span 2; /* Apr–May 2024 */
}

/* Contact Links */
.contact-links {
  display: flex;
  justify-content: space-around;
  width: 50%;
  margin: auto;
}

.contact-links a {
  text-decoration: none;
  color: var(--primary-green);
  border-bottom: 1px dotted var(--primary-green);
}

.contact-links a:hover {
  font-weight: bold;
}

/* Simple research / explorations sections adapted from the Flask app */
.research-intro-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-text {
  max-width: 700px;
  padding: 20px;
  text-align: justify;
  font-size: 14px;
  font-weight: 500;
}

.explorations-intro {
  text-align: center;
  margin-bottom: 20px;
}

.exploration-subtitle {
  font-size: 18px;
  color: var(--light-gray);
  font-style: italic;
  margin: 0;
}

.exploration-list {
  max-width: 700px;
  margin: 20px auto 0 auto;
  padding: 0 20px;
}
 
.exploration-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 10px 0;
}

.exploration-name {
  min-width: 180px;
  font-weight: 600;
}

.exploration-desc {
  flex: 1;
  font-size: 14px;
}

.exploration-list a {
  color: var(--primary-green);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-green);
  transition: all 0.3s ease;
}

.exploration-list a:hover {
  color: var(--accent-green);
  border-bottom: 1px solid var(--accent-green);
  font-weight: bold;
}

/* Random / thoughts section */
.random-text {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  font-size: 14px;
}

.random-text .facts p {
  padding-left: 24px;
  margin: 4px 0;
}

/* Cat ASCII link at bottom */
.cat-container {
  margin: 60px 20px 40px 20px;
  text-align: right;
}

.cat-container a {
  text-decoration: none;
  color: var(--primary-green);
}

.ascii-cat {
  font-family: 'Audiowide', cursive;
  font-size: 10px;
  white-space: pre;
  color: var(--primary-green);
  max-width: 100%;
  overflow-x: auto;
  display: inline-block;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (768px) */
@media screen and (max-width: 768px) {
  body {
    padding: 0 10px;
  }

  .header {
    flex-direction: column;
    align-items: center;
    margin: 15px 10px;
    gap: 8px;
  }

  .header h1 {
    text-align: center;
  }

  .first-name {
    font-size: 42px;
  }

  .last-name {
    font-size: 20px;
  }

  .ascii-bar {
    font-size: 10px;
    margin-right: 0;
    margin-top: 5px;
    width: 100%;
    overflow-x: auto;
    text-align: center;
  }

  .section {
    margin: 50px 0;
  }

  .section-title {
    font-size: 24px;
  }

  #about-me {
    flex-direction: column;
    margin: 0;
    width: 100%;
    align-items: center;
  }

  .profile-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 400 / 350;
    margin-left: 0;
    margin-bottom: 20px;
  }

  #about-me .text {
    padding: 12px 20px;
    font-size: 15px;
  }

  .exploration-list {
    padding: 0 15px;
  }

  .exploration-row {
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
  }

  .exploration-name {
    min-width: auto;
    width: 100%;
  }

  .exploration-desc {
    font-size: 13px;
  }

  .exploration-subtitle {
    font-size: 16px;
    padding: 0 15px;
  }

  .contact-links {
    width: 100%;
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .random-text {
    padding: 0 20px;
    font-size: 13px;
  }

  .cat-container {
    margin: 40px 10px 30px 10px;
    text-align: center;
  }

  .ascii-cat {
    font-size: 8px;
  }
}

/* Mobile phones (480px and below) */
@media screen and (max-width: 480px) {
  body {
    padding: 0 5px;
  }

  .header {
    margin: 10px 5px;
    gap: 5px;
    align-items: center;
  }

  .header h1 {
    text-align: center;
  }

  .first-name {
    font-size: 32px;
  }

  .last-name {
    font-size: 18px;
  }

  .ascii-bar {
    font-size: 9px;
    line-height: 1.4;
    text-align: center;
    margin-top: 3px;
  }

  .section {
    margin: 40px 0;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .profile-image {
    max-width: 100%;
    margin-bottom: 15px;
  }

  #about-me .text {
    padding: 10px 15px;
    font-size: 14px;
  }

  .indented-quote {
    font-size: 12.5px;
  }

  .exploration-list {
    padding: 0 10px;
  }

  .exploration-row {
    margin: 12px 0;
  }

  .exploration-name {
    font-size: 14px;
  }

  .exploration-desc {
    font-size: 12px;
  }

  .exploration-subtitle {
    font-size: 14px;
    padding: 0 10px;
  }

  .random-text {
    padding: 0 15px;
    font-size: 12px;
  }

  .cat-container {
    margin: 30px 5px 20px 5px;
  }

  .ascii-cat {
    font-size: 7px;
  }
}
