/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #FAF8F5; /* Warm off-white */
  --text-color: #1E1E1E; /* Very dark grey */
  --outline-color: #1E1E1E; /* Very dark grey */
  --line-color: #DCA11D; /* Orangey-Yellow upright lines */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --upright-width: 6px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
}

/* Shelving System Container */
.shelving-system {
  width: 92%;
  max-width: 1120px;
  display: grid;
  /* Columns: Left Margin | Upright 1 | Left Col | Upright 2 | Right Col | Upright 3 | Right Margin */
  grid-template-columns: 1fr var(--upright-width) minmax(300px, 460px) var(--upright-width) minmax(300px, 460px) var(--upright-width) 1fr;
  position: relative;
  margin-top: 1rem;
  margin-bottom: 6rem;
}

/* Upright Poles */
.upright {
  background-color: var(--line-color);
  grid-row: 1 / 30; /* Run down the entire grid height */
  position: relative;
  transition: background-color 0.3s ease;
  z-index: 2;
}

/* Style the top and bottom tips of the uprights to look like real metal poles */
.upright::before, .upright::after {
  content: '';
  position: absolute;
  left: -2px;
  width: calc(var(--upright-width) + 4px);
  height: 4px;
  background-color: var(--line-color);
  transition: background-color 0.3s ease;
}

.upright::before {
  top: -4px;
}

.upright::after {
  bottom: -4px;
}

/* Align the upright columns explicitly */
.upright-1 {
  grid-column: 2;
}

.upright-2 {
  grid-column: 4;
}

.upright-3 {
  grid-column: 6;
}

/* Shelving content columns */
.column-left {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  padding: 0 1.75rem;
  box-sizing: border-box;
}

.column-right {
  grid-column: 5;
  display: flex;
  flex-direction: column;
  padding: 0 1.75rem;
  box-sizing: border-box;
  /* Shelves in the right column start lower */
  margin-top: 5.5rem; 
}

/* Reusable Modular Shelving Elements */

/* 1. Cabinet Box (Name Display) */
.cabinet-display {
  border: 2px solid var(--outline-color);
  background-color: var(--bg-color);
  padding: 3.5rem 2rem; /* generous vertical breathing room, half height again of the large text */
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.01);
  z-index: 3;
}

/* Minimalist hinges/details on cabinet corners to enhance realism */
.cabinet-display::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--outline-color);
  border-left: 1.5px solid var(--outline-color);
}
.cabinet-display::after {
  content: '';
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-bottom: 1.5px solid var(--outline-color);
  border-right: 1.5px solid var(--outline-color);
}

/* Bracket attachments for cabinet display */
.cabinet-bracket-left, .cabinet-bracket-right {
  position: absolute;
  width: 8px;
  height: 6px;
  background-color: var(--outline-color);
  z-index: 2;
}

.cabinet-bracket-left {
  left: -20px;
  top: 28px;
}

.cabinet-bracket-right {
  right: -20px;
  top: 28px;
}

.cabinet-display h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.04em;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
}

.cabinet-display .cabinet-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 1rem;
  color: #777;
  font-weight: 600;
}

/* 2. Standard Shelf */
.shelf {
  border-bottom: 2px solid var(--outline-color);
  padding-bottom: 0.75rem;
  margin-top: 4.5rem; /* plenty of space above the content */
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
}

/* Small visual indicators where shelf brackets connect to uprights */
.shelf::before, .shelf::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 6px;
  background-color: var(--outline-color);
}

.shelf::before {
  left: -20px;
}

.shelf::after {
  right: -20px;
}

.shelf-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #777;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.shelf-content {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}

/* Special styling for GitHub & Email Shelves */
.shelf-github {
  margin-top: 3.25rem; /* reduced by 50% as requested */
  padding-right: 70px;
}

.shelf-email {
  margin-top: 4.5rem; /* standard shelf margin since it is second */
  text-align: right;
  padding-left: 105px;
}

.shelf-experience-arm {
  padding-right: 95px;
}

.shelf-experience-siemens {
  padding-left: 95px;
}

.shelf-email a,
.shelf-github a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1.5px solid var(--text-color);
  transition: opacity 0.2s ease;
  font-weight: 600;
}

.shelf-email a:hover,
.shelf-github a:hover {
  opacity: 0.7;
}

/* Shelf Decorations positioning */
.shelf-deco {
  position: absolute;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
}

.books1-deco {
  right: 15px;
  height: 80px;
}

.books3-deco {
  left: 15px;
  height: 80px;
}

.vase-deco {
  right: 15px;
  height: 80px;
}

.lamp-deco {
  left: 15px;
  height: 90px;
}

.books2-deco {
  position: absolute;
  bottom: 100%;
  right: 15px;
  height: 80px;
  pointer-events: none;
  z-index: 4;
}

/* 3. Spider Plant Shelf styling */
.plant-shelf {
  border-bottom: 2px solid var(--outline-color);
  margin-top: 1rem; /* Sits at top of right column */
  position: relative;
  display: flex;
  justify-content: flex-end; /* Align spider plant to the right */
  height: 160px; /* height to accommodate the plant pot */
  z-index: 3;
}

.plant-shelf::before, .plant-shelf::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 6px;
  background-color: var(--outline-color);
}

.plant-shelf::before {
  left: -20px;
}

.plant-shelf::after {
  right: -20px;
}

.plant-wrapper {
  position: absolute;
  bottom: 0;
  right: 15px; /* aligned to the right-hand side */
  width: 160px;
  pointer-events: none;
  z-index: 4; /* ensures the plant sits on top/in front of the shelf line */
}

/* Let the plant image overflow below the shelf line, bisected at its midpoint */
.spider-plant-img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(50%);
}

/* 4. Drawers Cabinet (3 Drawers) */
.drawers-cabinet-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #777;
  margin-top: 8.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-align: left;
}

.drawers-cabinet {
  border: 2px solid var(--outline-color);
  background-color: var(--bg-color);
  margin-top: 0;
  margin-bottom: 2rem;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.01);
  z-index: 3;
}

/* Small bracket attachments for drawers cabinet */
.drawers-cabinet::before, .drawers-cabinet::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 6px;
  background-color: var(--outline-color);
}

.drawers-cabinet::before {
  left: -20px;
  top: 28px;
}

.drawers-cabinet::after {
  right: -20px;
  top: 28px;
}

.drawer {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
}

/* Drawer links styled as full-width clickable areas */
.drawer a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.drawer-lang {
  color: #777;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.drawer a:hover {
  background-color: rgba(30, 30, 30, 0.03);
  opacity: 0.8;
}

/* Horizontal grooves that fade away at both ends */
.drawer-groove {
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, transparent, var(--outline-color) 8%, var(--outline-color) 92%, transparent);
}

/* Project card styles */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background-color: rgba(30, 30, 30, 0.05);
  padding: 0.15rem 0.5rem;
  width: fit-content;
  font-weight: 700;
  margin-top: 0.5rem;
  color: #555;
  border-radius: 2px;
}

.project-desc {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Footer links */
footer {
  margin-top: auto;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
}

/* Responsive Layout Adjustments */
@media (max-width: 900px) {
  .shelving-system {
    grid-template-columns: 10px var(--upright-width) 1fr var(--upright-width) 1fr var(--upright-width) 10px;
    width: 98%;
  }
  .column-left, .column-right {
    padding: 0 1rem;
  }
  .shelf::before { left: -14px; }
  .shelf::after { right: -14px; }
  .plant-shelf::before { left: -14px; }
  .plant-shelf::after { right: -14px; }
  .drawers-cabinet::before { left: -14px; }
  .drawers-cabinet::after { right: -14px; }
  .cabinet-bracket-left { left: -14px; }
  .cabinet-bracket-right { right: -14px; }
}

@media (max-width: 720px) {
  .shelving-system {
    grid-template-columns: 10px var(--upright-width) 1fr var(--upright-width) 10px;
    width: 98%;
  }
  .upright-1 {
    grid-column: 2;
  }
  .upright-2 {
    display: none;
  }
  .upright-3 {
    grid-column: 4;
  }
  .column-left {
    grid-column: 3;
  }
  .column-right {
    grid-column: 3;
    margin-top: 3rem;
  }
  .cabinet-display h1 {
    font-size: 1.8rem;
  }
  .cabinet-display {
    padding: 2.5rem 1rem;
  }
  .shelf-content {
    font-size: 0.95rem;
  }
  .shelf {
    margin-top: 3rem;
  }
  .shelf-github {
    margin-top: 2.25rem;
  }
  .plant-shelf {
    height: 140px;
  }
  .plant-wrapper {
    width: 120px;
    height: auto;
  }
  .drawers-cabinet-title {
    margin-top: 8rem;
  }
  .drawers-cabinet {
    height: 150px;
  }
}
