:root {
  --bg-color: #070b12;
  --blue-color: #2774AE;
  --blue-deep: #102b46;
  --gold-color: #F4C542;
  --text-color: #000000;
  --muted-color: rgba(230, 230, 230, 0.72);
  --accent-color: var(--gold-color);
  --navbar-bg: rgba(7, 11, 18, 0.78);
  --card-bg: rgba(0, 0, 0, 0.05);
  --surface-bg: rgba(255, 255, 255, 0.045);
  --border-color: rgba(244, 197, 66, 0.14);
}

body.dark-mode {
  --bg-color: #070b12;
  --text-color: #e6e6e6;
  --muted-color: rgba(230, 230, 230, 0.68);
  --accent-color: var(--gold-color);
  --navbar-bg: rgba(7, 11, 18, 0.78);
  --card-bg: rgba(255, 255, 255, 0.04);
  --surface-bg: rgba(255, 255, 255, 0.05);
  --border-color: rgba(244, 197, 66, 0.14);
  background:
    linear-gradient(135deg, rgba(39, 116, 174, 0.24) 0%, rgba(7, 11, 18, 0) 32%),
    linear-gradient(225deg, rgba(244, 197, 66, 0.09) 0%, rgba(7, 11, 18, 0) 28%),
    var(--bg-color);
}

body.light-mode {
  --bg-color: #f8fafc;
  --text-color: #222;
  --muted-color: rgba(34, 34, 34, 0.66);
  --accent-color: var(--blue-color);
  --navbar-bg: rgba(248, 250, 252, 0.88);
  --card-bg: #ffffff;
  --surface-bg: #ffffff;
  --border-color: rgba(39, 116, 174, 0.16);
  background:
    linear-gradient(135deg, rgba(39, 116, 174, 0.12) 0%, rgba(248, 250, 252, 0) 34%),
    linear-gradient(225deg, rgba(244, 197, 66, 0.14) 0%, rgba(248, 250, 252, 0) 30%),
    var(--bg-color);
}

body.light-mode .navbar,
body.light-mode .project-card,
body.light-mode #about {
  box-shadow: none;
}

body.light-mode .nav-links li a:hover {
  color: var(--accent-color);
}

body, 
.navbar, 
.project-card, 
section, 
#theme-toggle, 
.nav-links li a, 
footer, 
.about-current, 
.about-extra, 
.about-intro,
.btn,
.skill-group,
.highlight {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, width 0.4s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(244, 197, 66, 0.12);
  border-radius: 999px;
  width: min(calc(100% - 40px), 1120px);
  margin: 16px auto;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: none;
}

.navbar.shrink {
  padding: 8px 40px;
  background: var(--navbar-bg);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-color);
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 50%;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px var(--accent-color));
}

.logo h1 {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.96rem;
  font-weight: 500;
  padding: 6px 4px;
  border-radius: 6px;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links li a:hover {
  color: var(--accent-color);
}

.nav-links li a:hover::after {
  width: 100%;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text-color);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.2);
}

section {
  min-height: auto;
  padding: 112px 24px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

section h2 {
  font-family: 'Sora', sans-serif;
  width: 100%;
  max-width: 1040px;
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 36px;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0;
}

section p {
  font-size: 1.2rem;
  max-width: 700px;
}

#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; 
  min-height: 92vh;
  padding: 154px 24px 80px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.about-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1040px;
  gap: 52px;
}

.about-left {
  flex: 2;
}

.about-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.portrait {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}

.about-intro {
  font-family: 'Sora', sans-serif;
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  max-width: 760px;
}

.about-extra {
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--muted-color);
}

.about-current {
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 20px;
}

.highlight {
  color: var(--accent-color);
}

.eyebrow {
  color: var(--accent-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1040px;
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  box-shadow: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 197, 66, 0.28);
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.project-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.project-card p {
  font-size: 1rem;
  margin-bottom: 14px;
}

.project-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 900px;
}

.project-row {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-row:first-child {
  border-top: 1px solid var(--border-color);
}

.project-row:hover {
  border-color: rgba(244, 197, 66, 0.28);
  transform: translateX(4px);
}

.project-row-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.project-row-content h3 {
  font-family: 'Sora', sans-serif;
  color: var(--text-color);
  font-size: 1.32rem;
  line-height: 1.25;
  margin-bottom: 4px;
}

.project-row-content p {
  color: var(--muted-color);
  font-size: 1rem;
  max-width: 620px;
  margin-bottom: 6px;
}

.project-row-content .project-tech {
  color: var(--accent-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0;
}

.btn {
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-color);
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  text-transform: uppercase;
  line-height: 1.2;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: #e6b933;
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  border-color: rgba(244, 197, 66, 0.45);
  color: var(--text-color);
}

.btn.secondary:hover {
  background: var(--accent-color);
  color: #000;
}

.social-icons {
  display: flex;
  gap: 20px;
  justify-content: center; 
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #e6e6e6;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
}

.social-icons a.github {
  background: #000;
}

.social-icons a.linkedin {
  background: #0077b5;
}

.social-icons a.email {
  background: #c23a2b;
}

.social-icons a:hover {
  transform: scale(1.1);
}

.social-icons a:focus-visible,
.btn:focus-visible,
.nav-links li a:focus-visible,
#theme-toggle:focus-visible,
.menu-toggle:focus-visible,
#back-to-top:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

.top-icons a,
.right-icons a {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.footer-icons a {
  width: 35px;
  height: 35px;
  font-size: 1rem;
  opacity: 0.8;
}

.footer-icons a:hover {
  opacity: 1;
}

.cursor {
  display: inline-block;
  font-weight: bold;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    width: calc(100% - 24px);
    padding: 12px 16px;
    border-radius: 14px;
  }
  .logo h1 {
    font-size: 1.05rem;
  }
  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 15px;
    margin-top: 14px;
    order: 4;
  }
  .nav-links.active {
    display: flex;
  }
  #theme-toggle {
    margin-left: 12px;
  }
  #about {
    padding: 120px 20px 50px;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  .about-right {
    margin-top: 20px;
  }
  .hero-actions {
    justify-content: center;
  }
  .experience-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .experience-heading {
    grid-template-columns: 56px 1fr;
    align-items: start;
  }
  .experience-heading .date-pill {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
  .education-date {
    position: static;
    margin-top: 16px;
  }
  .project-row {
    grid-template-columns: 64px 1fr;
    align-items: start;
  }
  .project-row-img {
    width: 56px;
    height: 56px;
  }
  .project-row .btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .about-intro {
    font-size: 1.6rem;
  }
  .about-extra, .about-current {
    font-size: 1rem;
  }
  .portrait {
    width: 120px;
    height: 120px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 100px 20px 30px;
  }
}

.project-card img.aws-badge {
  width: 150px !important;
  height: auto;
  display: block;
  margin: 0 auto 15px;
}

.project-card img.project-img {
  height: 165px;
  object-fit: contain;
  width: 100%;
  margin: 0 auto 15px;
  display: block;
  background: transparent;
  border-radius: 0;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-color);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: scale(1.1);
  background-color: #e6b933;
}

.nav-links li a.active {
  color: var(--accent-color);
  font-weight: 600;
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 72px;
  width: 100%;
  max-width: 1120px;
  align-items: start;
}

.experience-column h2,
.education-column h2 {
  max-width: none;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.experience-timeline {
  position: relative;
  padding-left: 42px;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: 2px;
  background: rgba(39, 116, 174, 0.32);
}

.experience-item {
  position: relative;
  margin-bottom: 48px;
}

.experience-item:last-child {
  margin-bottom: 0;
}

.experience-dot {
  position: absolute;
  top: 25px;
  left: -40px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid rgba(138, 164, 255, 0.42);
  border-radius: 50%;
  background: var(--bg-color);
  opacity: 0.58;
  box-shadow: 0 0 0 4px rgba(39, 116, 174, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.experience-content {
  padding-bottom: 4px;
}

.experience-item.is-featured .experience-dot {
  border-color: var(--gold-color);
  opacity: 1;
  transform: scale(1.08);
  box-shadow:
    0 0 0 6px rgba(244, 197, 66, 0.14),
    0 0 30px rgba(244, 197, 66, 0.38),
    0 0 24px rgba(39, 116, 174, 0.45);
}

.experience-item.is-dimmed .experience-dot {
  border-color: rgba(138, 164, 255, 0.28);
  opacity: 0.42;
}

.experience-item.is-dimmed:hover .experience-dot,
.experience-item.is-dimmed:focus-within .experience-dot {
  border-color: #8aa4ff;
  opacity: 1;
  transform: scale(1.08);
  box-shadow:
    0 0 0 6px rgba(39, 116, 174, 0.14),
    0 0 28px rgba(39, 116, 174, 0.45),
    0 0 16px rgba(244, 197, 66, 0.16);
}

.experience-heading {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.experience-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

.experience-heading h3 {
  font-family: 'Sora', sans-serif;
  color: var(--text-color);
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.experience-heading p {
  color: var(--accent-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--muted-color);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.experience-content > p {
  color: var(--muted-color);
  font-size: 1rem;
  max-width: 650px;
  margin-bottom: 8px;
}

.experience-tech {
  color: var(--muted-color) !important;
  font-size: 0.9rem !important;
  margin-bottom: 0 !important;
}

.education-card {
  position: relative;
  width: 100%;
  min-height: 300px;
  padding: 30px;
  border: 1px solid rgba(39, 116, 174, 0.38);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(39, 116, 174, 0.12) 0%, rgba(244, 197, 66, 0.05) 100%),
    var(--surface-bg);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.education-card:hover {
  border-color: rgba(244, 197, 66, 0.34);
}

.education-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.education-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 16px;
}

.education-date {
  flex: 0 0 auto;
  margin-top: 6px;
}

.education-body {
  margin-top: 30px;
}

.education-body h3 {
  font-family: 'Sora', sans-serif;
  color: var(--text-color);
  font-size: 1.95rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.education-body p {
  color: var(--muted-color);
  font-size: 1.05rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1040px;
}

.skill-group {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.skill-group:hover {
  border-color: rgba(244, 197, 66, 0.28);
  background: var(--surface-bg);
}

.skill-group h3 {
  font-family: 'Sora', sans-serif;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.skill-group p {
  color: var(--muted-color);
  font-size: 1rem;
}
