body {
  margin: 0;
  padding: 0;
  background-color: white;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* Layout */
.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  max-width: 1200px;
}
@media (min-width: 992px) {
  .container {
      width: 970px;
   }
}
@media (max-width: 576px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

/* Profile Section */
#profile-section {
  margin-top: 20px;
  margin-bottom: 40px;
}

#profile-layout {
  display: flex;
  align-items: center;
  gap: 40px;
}

#profile-pic {
  flex-shrink: 0;
}

.profile-pic-wrapper {
  padding: 2px;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 35%, #AF52DE 65%, #FFD60A 100%);
  border-radius: 12px;
  display: inline-block;
}

#profile-pic img {
  width: 160px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: none;
}

#profile-info {
  flex: 1;
}

#profile-info h1 {
  margin: 0 0 10px 0;
}

.credentials {
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 35%, #AF52DE 65%, #FFD60A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 15px 0;
}

.description {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 20px 0;
}

#name-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

#name-social h1 {
  margin: 0;
}

#social-links {
  display: flex;
  gap: 15px;
}

@media (max-width: 768px) {
  #profile-layout {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  /* Timeline container positioning */
  #history {
    position: relative;
    padding-left: 0;
  }
  
  /* Timeline entries layout */
  .entry {
    margin-bottom: 30px;
    position: relative;
  }
  
  .entry.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
  }
  
  /* Year positioning - left of dots */
  .timespan {
    grid-column: span 2;
    font-size: 12px;
    color: #bbb;
    text-align: right;
    padding-right: 15px;
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 0px;
  }
  
  /* Timeline icon with vertical line (matches desktop) */
  .ico {
    grid-column: span 1;
    vertical-align: top;
    border-left: 2px solid #cfcfcf;
    position: relative;
    padding-left: 10px;
    min-height: 50px;
  }
  
  /* Extend line to connect all entries */
  .entry:not(:last-child) .ico::after {
    content: '';
    position: absolute;
    left: -2px;
    bottom: -30px;
    width: 2px;
    height: 30px;
    background-color: #cfcfcf;
  }
  
  .ico img {
    border-radius: 5px;
    width: 100%;
    max-width: 32px;
    position: absolute;
    left: 20px;
    top: -2px;
  }
  
  /* Timeline dot (matches desktop positioning) */
  .entry-dot {
    position: absolute;
    top: 0;
    left: -7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cfcfcf;
    border: 2px solid white;
  }
  
  /* Job description */
  .desc {
    grid-column: span 9;
    vertical-align: top;
    font-size: 16px;
    padding-left: 15px;
    padding-bottom: 20px;
    text-align: left;
    color: #555;
  }
  
  #name-social {
    flex-direction: column;
    gap: 15px;
  }
  
  #name-social h1 {
    font-size: 28px;
  }
  
  .credentials {
    font-size: 16px;
  }
  
  .description {
    font-size: 15px;
  }
  
  .iico {
    width: 35px;
    height: 35px;
  }
}

/* Additional mobile breakpoint for very small screens */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 24px !important;
  }
  
  .timeline-title {
    font-size: 24px;
  }
  
  #profile-pic img {
    width: 120px;
    height: 150px;
  }
  
  .entry {
    margin-bottom: 25px;
  }
  
  .timespan {
    font-size: 11px;
    padding-bottom: 5px;
  }
  
  .desc {
    padding-left: 12px;
    font-size: 15px;
  }
  
  .ico {
    padding-left: 8px;
    min-height: 45px;
  }
  
  .ico img {
    left: 18px;
    max-width: 28px;
  }
  
  .entry-dot {
    width: 8px;
    height: 8px;
    left: -6px;
  }
  
  /* Connect timeline for small mobile */
  .entry:not(:last-child) .ico::after {
    height: 25px;
    bottom: -25px;
  }
}

/* Content Layout */
#content-layout {
  margin-bottom: 40px;
}

#left-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
h1 {
  font-size: 34px;
  font-weight: normal;
  padding: 0;
  margin: 0;
}
h2 {
  font-weight: normal;
  color: #999;
  font-size: 18px;
  padding: 0;
  margin: 5px 0 10px 0;
}
@media (min-width: 992px) {
  h2 {
      max-width: 300px;
  }
}
.iico {
  width: 40px;
  height: 40px;
}
hr {
  height: 1px;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
  padding: 0;
  margin: 20px 0;
  border: 0;
}
.ico {
  grid-column: span 1;
  vertical-align: top;
  border-left: 2px solid #cfcfcf;
  position: relative;
  padding-left: 10px;
}
.ico img {
  border-radius: 5px;
  width: 100%;
  max-width: 32px;
  position: absolute;
  left: 20px;
  top: -2px;
}

.desc {
  grid-column: span 9;
  vertical-align: top;
  font-size: 17px;
  padding-left: 15px;
  padding-bottom: 20px;
}

.entry-dot {
  position: absolute;
  top: 0;
  left: -7px;
  width: 10px;
  height: 10px;
  border-radius: 7px;
  background-color: #cfcfcf;
  border: 2px solid white;
}

.timespan {
  grid-column: span 2;
  font-size: 14px;
  text-align: right;
  padding-right: 15px;
  color: #bbb;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 0px;
}


/* Projects */
#pet-projects .row {
  grid-column-gap: 10px;
  grid-row-gap: 10px;
}
.project {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.pico {
  flex-shrink: 0;
}
.pdesc {
  font-size: 16px;
  flex: 1;
}

.pico img {
  height: 80px;
  border-radius: 5px;
  border: 1px solid #999;
}

/* Mobile responsiveness for projects */
@media (max-width: 768px) {
  .project {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
  
  .pico img {
    height: 60px;
  }
  
  .pdesc {
    font-size: 15px;
  }
}

#dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Mobile positioning for dark mode toggle */
@media (max-width: 768px) {
  #dark-mode-toggle {
    top: 15px;
    right: 15px;
  }
  
  #dark-mode-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

#dark-mode-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#dark-mode-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

body.dark-mode hr {
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.75), rgba(255,255,255,0));
}

body.dark-mode a {
  color: #4CAF50;
}

body.dark-mode .project {
  border-bottom: 1px solid #444;
}

body.dark-mode .pico img {
  border: 1px solid #666;
}

h2 a {
  text-decoration: none;
  color: #4CAF50;
  transition: color 0.3s ease;
}

h2 a:hover {
  color: #45a049;
}

body.dark-mode h2 a {
  color: #5CFF5C;
}

body.dark-mode h2 a:hover {
  color: #7FFF7F;
}

/* Animation styles */
.typing-cursor {
  animation: blink 1s infinite;
  font-weight: normal;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.entry {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.entry.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.timespan {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.5s ease-out;
}

.timespan.slide-in-left {
  opacity: 1;
  transform: translateX(0);
}

.desc {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.5s ease-out;
}

.desc.slide-in-right {
  opacity: 1;
  transform: translateX(0);
}

.ico {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease-out;
}

.ico.scale-in {
  opacity: 1;
  transform: scale(1);
}

.project {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

.project.animate-in {
  opacity: 1;
  transform: translateY(0);
}


#profile-pic {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s ease-out;
}

#profile-pic.animate-in {
  opacity: 1;
  transform: scale(1);
}

#profile-info {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease-out;
}

#profile-info.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.ppic {
  transition: transform 0.1s ease-out;
}

/* Timeline Title */
.timeline-title {
  margin: 0 0 30px 0;
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  position: relative;
}

.timeline-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* Dark mode styles */
body.dark-mode .timeline-title {
  color: #ecf0f1;
}

/* Dark mode for profile section */
body.dark-mode .credentials {
  background: linear-gradient(135deg, #0A84FF 0%, #6C5CE7 35%, #BF7FFF 65%, #FFE066 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .description {
  color: #bdc3c7;
}

body.dark-mode .profile-pic-wrapper {
  background: linear-gradient(135deg, #0A84FF 0%, #6C5CE7 35%, #BF7FFF 65%, #FFE066 100%);
}

/* Dark mode timeline styles */
@media (max-width: 768px) {
  body.dark-mode .entry::before {
    background-color: #666;
  }
  
  body.dark-mode .entry-dot {
    background-color: #666;
    border-color: #1a1a1a;
  }
  
  body.dark-mode .timespan {
    color: #aaa;
  }
  
  body.dark-mode .desc {
    color: #bbb;
  }
  
  body.dark-mode .ico img {
    border-color: #555;
  }
}

