html {
  scroll-behavior: smooth;
}
html, body {
  height: 100%;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4f0fa;
  font-family: 'Inter', Arial, sans-serif;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
  padding-top: 0;
  font-size: 0.95rem;
}
main {
  flex: 1;
}

.header {
  width: fit-content;
  margin: 32px auto 0 auto;
  padding: 8px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 3.5px solid #1a1a1a;
  border-radius: 16px;
  box-shadow: 10px 10px 0 #1a1a1a;
}
.header-left {
  color: #a78bfa;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 0.5px;
  padding-left: 15px;
}
.nav {
  display: flex;
  gap: 20px;
  align-items: center;
  width: 100%;
  justify-content: center;
}
.nav a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.1s ease-in-out;
  font-family: 'Inter', Arial, sans-serif;
  box-shadow: none;
}
.nav a:nth-child(1) {
    background-color: #e0e7ff;
}
.nav a:nth-child(2) {
    background-color: #fef9c3;
}
.nav a:nth-child(3) {
    background-color: #d1fae5;
}
.nav a:hover {
    transform: translateY(2px);
    border-radius: 8px;
    box-shadow: none;
}
.nav a.icon-btn {
  border: 2.5px solid #1a1a1a;
  padding: 2px 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 #1a1a1a;
  display: flex;
  align-items: center;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  margin: 60px auto 0 auto;
  max-width: 980px;
  width: 100%;
}
.hero-text {
  max-width: 650px;
  font-size: 1rem;
  margin-left: 0;
  text-align: left;
}
.hero-text h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
  margin-top: 0;
}
.highlight {
  color: #a78bfa;
}
.subtitle {
  font-size: 20px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.subtitle .tag {
  box-shadow: 3px 3px 0 #1a1a1a;
}
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 16px;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 700;
  margin: 0 2px 8px 2px;
  box-shadow: none;
}
.tag-purple { background: #a78bfa; color: #fff; box-shadow: none; }
.tag-green { background: #bbf7d0; color: #1a1a1a; box-shadow: none; }
.tag-grey { background: #e0e0e0; color: #1a1a1a; box-shadow: none; }
.tag-blue { background: #7DD3FC; color: #1a1a1a; box-shadow: none; }
.tag-pink { background: #f7b2d9; color: #fff; box-shadow: 3px 3px 0 #1a1a1a; border: 2.5px solid #1a1a1a; }

.btn {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  padding: 12px 32px;
  border: none;
  border-radius: 7px;
  background: #a78bfa;
  color: #fff;
  margin-top: 28px;
  box-shadow: 5px 5px 0 #1a1a1a;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
  position: relative;
  text-decoration: none;
}
.btn-primary {
  background: #a78bfa;
  color: #fff;
}
.btn-dark-grey { background: #181717; color: #fff; }
.btn-yellow { background: #FCD34D; color: #1a1a1a; }
.btn-blue { background: #60A5FA; color: #1a1a1a; }
.btn-light-blue { background: #7DD3FC; color: #1a1a1a; }
.btn-github { background: #23272f; color: #fff; }
.btn-linkedin { background: #b5d0ff; color: #1a1a1a; }
.btn-twitter { background: #b2e6fa; color: #1a1a1a; }
.btn-pink { background: #f7b2d9; color: #fff; box-shadow: 5px 5px 0 #1a1a1a; border: 2.5px solid #1a1a1a; }
.btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #1a1a1a;
}
.btn:active {
  transform: translate(5px, 5px);
  box-shadow: none;
}

.hero-img {
  margin-top: 0;
}
.profile-img {
  max-width: 100%;
  height: auto;
  width: 220px;
  background: #fff;
  border: 3.5px solid #1a1a1a;
  box-shadow: 7px 7px 0 #1a1a1a;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-size: 18px;
  font-family: 'Inter', Arial, sans-serif;
  color: #1a1a1a;
  padding: 10px;
  border-radius: 12px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.profile-img:hover {
  transform: translate(4px, 4px);
  box-shadow: 3px 3px 0 #1a1a1a;
}
.profile-img:active {
  transform: translate(7px, 7px);
  box-shadow: none;
}

.journey {
  margin-top: 110px;
  text-align: center;
}
.journey h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 5px solid #f7b2d9;
  display: inline-block;
  padding-bottom: 2px;
  letter-spacing: 0.5px;
}

/* Firefox-specific fixes for timeline consistency */
@-moz-document url-prefix() {
  .timeline {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 980px !important;
    overflow-x: hidden !important;
  }
  .timeline-card {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: calc(100% - 40px) !important;
  }
  .timeline-row {
    box-sizing: border-box !important;
    width: 50% !important;
  }
}

/* --- REFINED TIMELINE CSS --- */
.timeline {
    position: relative;
    max-width: 980px;
    margin: 80px auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}
.timeline::after {
    content: "";
    display: table;
    clear: both;
}
.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    width: 6px;
    top: 0;
    bottom: 0;
    background: #23272f;
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 #23272f22;
}
.timeline-row {
    position: relative;
    width: 50%;
    margin-bottom: 40px;
    box-sizing: border-box;
}
.timeline-row.left {
    float: left;
    clear: both;
    padding-right: 40px;
}
.timeline-row.right {
    float: right;
    clear: both;
    padding-left: 40px;
}
.timeline-row::after, .timeline-dot { display: none !important; }
.timeline-row::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  left: auto;
  width: 14px;
  height: 14px;
  background: #23272f;
  border: 3px solid transparent;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 3px #fff;
  transform: translateY(-50%);
}
.timeline-row.right::before {
  left: -10px;
  right: auto;
}
.timeline-row.card-yellow::before { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #fff9c4; }
.timeline-row.card-pink::before { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #f7b2d9; }
.timeline-row.card-green::before { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #b9fbc0; }
.timeline-row.card-purple::before { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #b5d0ff; }
.timeline-card {
  background: #fff;
  border: 3.5px solid #1a1a1a;
  box-shadow: 7px 7px 0 #1a1a1a;
  padding: 28px 32px 22px 32px;
  text-align: left;
  font-size: 1rem;
  border-radius: 12px;
  position: relative;
  transition: all 0.1s ease-in-out;
  padding-bottom: 32px;
  min-height: 170px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.timeline-card:hover {
    transform: translate(4px, 4px);
    box-shadow: 3px 3px 0 #1a1a1a;
}
.timeline-card:active {
    transform: translate(7px, 7px);
    box-shadow: none;
}
.card-pink { background: #f7b2d9; }
.card-purple { background: #b5d0ff; }
.card-green { background: #b9fbc0; }
.card-yellow { background: #fff9c4; }
.timeline-date {
  font-size: 0.95rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 7px;
  display: inline-block;
  padding: 2px 12px;
  margin-bottom: 10px;
  margin-right: 8px;
  box-shadow: 3px 3px 0 #1a1a1a;
}
.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.timeline-desc {
  font-size: 0.95rem;
  margin-top: 6px;
}

.connect {
  margin-top: 140px;
  text-align: center;
  clear: both; /* Clear floats from timeline */
}
.connect h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 36px;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 5px solid #f7b2d9;
}
.connect-box {
  margin: 0 auto;
  background: #fffbe0;
  border: 3.5px solid #1a1a1a;
  box-shadow: 7px 7px 0 #1a1a1a;
  max-width: 600px;
  padding: 38px 28px 34px 28px;
  text-align: center;
  border-radius: 14px;
}
.connect-label {
    font-size: 18px;
    margin: 28px 0 12px 0;
}
.connect-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.connect-socials .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 3.5px solid #1a1a1a;
    width: 120px;
    height: 38px;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
}
.connect-email {
  width: 100%;
  max-width: 360px;
  min-width: 220px;
  box-sizing: border-box;
  padding-left: 4px;
  padding-right: 4px;
  display: inline-block;
  background: #ffe066;
  border: 2.5px solid #1a1a1a;
  border-radius: 7px;
  font-size: 16px;
  font-family: 'Inter', Arial, sans-serif;
  padding: 0 18px;
  text-align: center;
  margin-bottom: 22px;
  margin-top: 6px;
  box-shadow: 3px 3px 0 #1a1a1a;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
  line-height: 38px;
  vertical-align: middle;
}
.connect-email:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #1a1a1a;
}
.connect-email:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}
.footer {
  margin-top: 80px;
  text-align: center;
  font-size: 16px;
  color: #1a1a1a;
  padding-bottom: 32px;
  padding-top: 32px;
  border-top: 3.5px solid #1a1a1a;
}

/* Optimized media queries for better performance */
@media (max-width: 1200px) {
  .hero {
    gap: 40px;
    padding: 0 24px;
  }
  .timeline {
    max-width: 98vw;
    padding: 0 12px;
  }
}

@media (max-width: 900px) {
  body, main {
    padding-left: 4px;
    padding-right: 4px;
    font-size: 1.05rem;
  }
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 0 8px;
  }
  .hero-img {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }
  .profile-img {
    width: 320px;
    max-width: 100%;
    min-width: 140px;
    padding: 16px;
    font-size: 20px;
  }
  .hero-text {
    order: 2;
    text-align: center;
    margin: 0 auto;
    padding: 0;
  }
  .hero-text h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
  }
  .subtitle {
    font-size: 1.3rem;
    font-weight: 500;
  }
  .btn.btn-pink {
    display: block;
    margin: 18px auto 0 auto;
    width: fit-content;
    font-size: 1.05rem;
    padding: 10px 24px;
  }
  .timeline {
    padding-left: 4px;
    padding-right: 4px;
  }
  .timeline:before {
    left: 4px;
  }
  .timeline-row {
    width: 100%;
    float: none;
    clear: both;
    margin-bottom: 36px;
    padding: 0;
    position: relative;
    text-align: left;
    min-height: 0;
    display: flex;
    align-items: flex-start;
  }
  .timeline-row.left,
  .timeline-row.right {
    float: none;
    padding: 0;
    text-align: left;
  }
  .timeline-row::before {
    left: 4px;
    right: auto;
    transform: translate(-50%, 0);
    top: 24px;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 2;
  }
  .timeline-card {
    margin: 0 0 18px 20px !important;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    font-size: 1.05rem;
  }
  .connect-box {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding-left: 4px;
    padding-right: 4px;
  }
  .connect-email {
    width: 86vw;
    max-width: 86vw;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  .connect-label {
    text-align: center;
  }
  .connect-socials {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .footer {
    font-size: 1rem;
    padding: 20px 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  .header {
    max-width: 420px;
    width: auto;
    margin: 12px 8px 0 8px;
    padding: 14px 18px;
    border-radius: 14px;
  }
  .nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0;
    gap: 0;
  }
  .nav a {
    font-size: 17px;
    padding: 10px 12px;
    border-radius: 6px;
  }
  .timeline-date {
    font-size: 0.98rem;
  }
  .timeline-title {
    font-size: 1.13rem;
  }
  .timeline-desc {
    font-size: 0.98rem;
  }
}

@media (max-width: 700px) {
  body, main {
    padding-left: 4px;
    padding-right: 4px;
    font-size: 1.08rem;
  }
  .hero {
    padding-left: 4px;
    padding-right: 4px;
  }
  .timeline {
    position: relative;
  }
  .timeline:before {
    left: 16px;
    transform: translateX(-50%);
  }
  .timeline-row::before,
  .timeline-row.right::before {
    left: 16px;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .timeline-card {
    margin-left: 40px !important;
    font-size: 1.02rem;
  }
  .connect-box {
    padding-left: 4px;
    padding-right: 4px;
  }
  .footer {
    padding-left: 4px;
    padding-right: 4px;
  }
  .hero {
    gap: 14px;
    padding: 0 4px;
  }
  .profile-img {
    width: 240px;
    min-width: 110px;
    padding: 12px;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .subtitle {
    font-size: 1.15rem;
  }
  .timeline-card,
  .connect-box {
    max-width: 98vw;
  }
  .connect-email {
    width: 86vw;
    max-width: 86vw;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  .footer {
    font-size: 0.95rem;
    padding: 14px 0;
  }
  .header {
    max-width: 98vw;
    margin: 10px 4px 0 4px;
    padding: 12px 10px;
    border-radius: 14px;
  }
  .nav {
    justify-content: space-evenly;
    padding: 0;
    gap: 0;
  }
  .nav a {
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 5px;
  }
  .timeline-date {
    font-size: 0.96rem;
  }
  .timeline-title {
    font-size: 1.09rem;
  }
  .timeline-desc {
    font-size: 0.96rem;
  }
}

@media (max-width: 480px) {
  body, main {
    padding-left: 2px;
    padding-right: 2px;
    font-size: 1.1rem;
  }
  .hero {
    padding-left: 8px;
    padding-right: 8px;
  }
  .timeline {
    position: relative;
  }
  .timeline:before {
    left: 16px;
    transform: translateX(-50%);
  }
  .timeline-row::before,
  .timeline-row.right::before {
    left: 16px;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .timeline-card {
    margin-left: 40px !important;
    font-size: 1rem;
  }
  .connect-box {
    padding-left: 8px;
    padding-right: 8px;
  }
  .footer {
    padding-left: 8px;
    padding-right: 8px;
  }
  .profile-img {
    width: 180px;
    min-width: 80px;
    padding: 8px;
  }
  .hero-text h1 {
    font-size: 1.5rem;
  }
  .subtitle {
    font-size: 1.1rem;
  }
  .timeline-card,
  .connect-box {
    max-width: 100vw;
  }
  .connect-email {
    width: 92vw;
    max-width: 92vw;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  .header {
    max-width: 98vw;
    margin: 8px 2px 0 2px;
    padding: 10px 6px;
    border-radius: 14px;
  }
  .nav {
    justify-content: space-evenly;
    padding: 0;
    gap: 0;
  }
  .nav a {
    font-size: 15px;
    padding: 7px 8px;
    border-radius: 4px;
  }
  .timeline-date {
    font-size: 0.93rem;
  }
  .timeline-title {
    font-size: 1.05rem;
  }
  .timeline-desc {
    font-size: 0.93rem;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  /* Center header/navbar */
  .header {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    max-width: 600px;
    padding: 12px 48px;
  }
  /* Navbar spacing for tablets */
  .nav {
    gap: 28px;
  }
  .nav a {
    font-size: 14px;
    padding: 8px 28px;
  }
  /* Center timeline section */
  .timeline {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
  }
  /* Center connect box */
  .connect-box {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
  }
  /* Timeline dot and line alignment */
  .timeline:before {
    left: 32px;
    transform: translateX(-50%);
  }
  .timeline-row::before,
  .timeline-row.right::before {
    left: 32px;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .timeline-card {
    margin-left: 48px !important;
    font-size: 1.05rem;
  }
  .timeline-title {
    font-size: 1.15rem;
  }
  .timeline-date, .timeline-desc {
    font-size: 1rem;
  }
  /* Center and size email button */
  .connect-email {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 340px;
    min-width: 180px;
    box-sizing: border-box;
    font-size: 1.05rem;
  }
  /* General font size */
  body {
    font-size: 1.05rem;
  }
  .header, .connect-box, .btn {
    font-size: 1.05rem;
  }
}

@media (min-width: 1025px) {
  body {
    font-size: 1.08rem;
  }
  .timeline-card {
    font-size: 1.05rem;
  }
  .timeline-title {
    font-size: 1.15rem;
  }
  .timeline-date, .timeline-desc {
    font-size: 1rem;
  }
  .header, .connect-box, .btn, .connect-email {
    font-size: 1.05rem;
  }
}

/* Performance optimizations */
.header, .header-left, .nav a, .hero-text h1, .subtitle, .tag, .btn, .journey h2, .timeline-card, .connect h2, .connect-label, .connect-email, .footer {
  font-family: 'Inter', Arial, sans-serif !important;
}

/* Optimized degree badges */
.degree, .university, .department {
  display: inline-block;
  padding: 0.02em 0.35em;
  border-radius: 0.35em;
  font-weight: 500;
  font-size: 0.78em;
  margin-right: 0.15em;
  margin-bottom: 0;
  border: 1.5px solid #222;
  letter-spacing: 0.05px;
  box-shadow: none;
  vertical-align: middle;
  line-height: 1.1;
}
.degree {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #7c3aed;
}
.university {
  background: #fff7ed;
  color: #f59e42;
  border-color: #f59e42;
}
.department {
  background: #e0f7fa;
  color: #0ea5e9;
  border-color: #0ea5e9;
}

/* Optimized navigation icons */
.nav-icon-text { 
  display: inline-flex; 
  align-items: center; 
}
.nav-icon { 
  margin-right: 8px; 
  display: inline-block; 
  vertical-align: middle; 
}

/* Optimized decorative underline */
.decor-underline {
  position: relative;
  display: inline-block;
}
.decor-underline::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 10px;
  background: url('data:image/svg+xml;utf8,<svg width="100%25" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M2 8 Q 20 2, 40 8 T 80 8 T 120 2 T 160 8 T 200 8" stroke="%23f7b2d9" stroke-width="3" fill="none"/></svg>') repeat-x;
  background-size: 120px 10px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
} 