/* Core layout and typography */
body {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #002b36;
  color: #fdf6e3;
  line-height: 1.6;
}

/* Sidebar structure */
.sidebar {
  width: 300px;
  background-color: #073642;
  border-right: 1px solid #586e75;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  box-sizing: border-box;
}

.content {
  margin-left: 300px;
  flex: 1;
  max-width: 850px;
  padding: 60px 50px;
  box-sizing: border-box;
}

/* Responsive Layout */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid #586e75;
    padding: 30px 20px;
  }
  .content {
    margin-left: 0;
    padding: 40px 20px;
  }
}

/* Sidebar Branding & Nav */
.sidebar-brand h2 {
  margin: 0 0 5px 0;
  color: #2aa198;
  font-size: 2rem;
  letter-spacing: -0.5px;
}

.sidebar-brand .subtitle {
  margin: 0 0 30px 0;
  color: #839496;
  font-size: 0.9rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.sidebar-nav .nav-item {
  color: #93a1a1;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-item:hover {
  background-color: #002b36;
  border-color: #586e75;
  color: #268bd2;
}

/* Contact Section & Animated Icons */
.sidebar-contact {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid #586e75;
}

.contact-icons {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  height: 90px;
  align-items: flex-end;
}

.contact-info {
  font-size: 0.85rem;
  color: #839496;
}

.info-line {
  margin: 6px 0;
}

.info-label {
  color: #586e75;
  font-weight: bold;
}

/* Envelope Animation */
.container {
  position: relative;
  width: 100px;
  height: 75px;
  cursor: pointer;
}

.envelope {
  position: relative;
  width: 100px;
  height: 75px;
  background-color: #94BDE5;
  border-radius: 0 0 4px 4px;
}

.envelope-front {
  width: 100px;
  height: 75px;
  background-color: #94BDE5;
  position: absolute;
  z-index: 50;
  -webkit-clip-path: polygon(50% 55%, 100% 0, 100% 100%, 0 100%, 0 0);
  clip-path: polygon(50% 55%, 100% 0, 100% 100%, 0 100%, 0 0);
  border-radius: 0 0 4px 4px;
}

.envelope-flap {
  width: 0; 
  height: 0; 
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-top: 50px solid #6393BF;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top center;
  transition: transform 0.4s ease-in-out;
}

.envelope-flap.moves {
  z-index: 30;
  border-top-color: #5582ad;
}

.container:hover .envelope-flap.moves {
  transform: rotateX(180deg);
  z-index: 15;
}

.letter {
  height: 60px;
  width: 80px;
  background-color: #ffffff;
  position: absolute;
  left: 10px;
  bottom: 5px;
  z-index: 20;
  border-radius: 2px;
  transition: transform 0.4s ease-in-out;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  padding: 6px;
  box-sizing: border-box;
}

.container:hover .letter {
  z-index: 40;
  transform: translateY(-35px);
}

.letter-stamp {
  width: 12px;
  height: 15px;
  background-color: #dc322f;
  float: right;
  border-radius: 1px;
}

.letter-lines {
  margin-top: 22px;
  height: 3px;
  width: 45px;
  background-color: #93a1a1;
  position: relative;
}

.letter-lines::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  height: 3px;
  width: 30px;
  background-color: #93a1a1;
}

/* Folder Animation */
.folder-container {
  position: relative;
  width: 100px;
  height: 75px;
  cursor: pointer;
}

.folder {
  position: relative;
  width: 100px;
  height: 75px;
}

.folder-tab {
  width: 35px;
  height: 12px;
  background-color: #b58900;
  position: absolute;
  top: -10px;
  left: 0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  z-index: 10;
}

.folder-back {
  width: 100px;
  height: 75px;
  background-color: #b58900;
  position: absolute;
  z-index: 10;
  border-radius: 0 4px 4px 4px;
}

.folder-front {
  width: 100px;
  height: 75px;
  background-color: #cb4b16;
  position: absolute;
  z-index: 50;
  border-radius: 0 4px 4px 4px;
  transform-origin: bottom center;
  transition: transform 0.4s ease-in-out;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.15);
}

.folder-container:hover .folder-front {
  transform: rotateX(-30deg);
}

.folder-document {
  height: 65px;
  width: 80px;
  background-color: #ffffff;
  position: absolute;
  left: 10px;
  bottom: 5px;
  z-index: 20;
  border-radius: 2px;
  transition: transform 0.4s ease-in-out;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  padding: 8px;
  box-sizing: border-box;
}

.folder-container:hover .folder-document {
  z-index: 40;
  transform: translateY(-35px);
}

.doc-line {
  height: 4px;
  width: 100%;
  background-color: #268bd2;
  margin-bottom: 6px;
  border-radius: 1px;
}

.doc-line.short {
  width: 60%;
  background-color: #2aa198;
}

/* Content Elements styling */
h1 {
  color: #2aa198;
  border-bottom: 1px solid #586e75;
  padding-bottom: 10px;
  margin-top: 0;
  font-size: 2.2rem;
}

h2 {
  color: #268bd2;
  font-size: 1.6rem;
  margin-top: 0;
}

a {
  color: #268bd2;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #dc322f;
  text-decoration: underline;
}

/* Projects layout */
section.project {
  background-color: #073642;
  border: 1px solid #586e75;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

section.project:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Project Media styling */
section.project img, section.project video {
  max-width: 45%;
  max-height: 200px;
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #586e75;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
}

section.project img:hover, section.project video:hover {
  max-width: 100%;
  max-height: 500px;
  float: none;
  display: block;
  margin: 15px auto;
  cursor: zoom-out;
}

/* Code & pre formatting */
pre {
  background-color: #002b36;
  border: 1px solid #586e75;
  border-radius: 6px;
  padding: 15px;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-x: auto;
  tab-size: 3;
}

.codetitle {
  font-style: italic;
  color: #839496;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.code {
  background-color: #073642;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Cookies banner (just in case they still use it) */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 11px;
  background-color: #073642;
  border-top: 1px solid #586e75;
  padding: 15px;
  text-align: center;
  z-index: 1000;
}

#cookie-banner p {
  margin: 4px 0;
}

#cookie-banner button {
  background-color: #2aa198;
  color: #002b36;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 8px;
}

#cookie-banner button:hover {
  background-color: #268bd2;
  color: #fdf6e3;
}
