:root {
  --ink-950: #07111f;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --line: #dbe4ee;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --brand: #1449dd;
  --brand-dark: #1039aa;
  --brand-soft: #eaf0ff;
  --accent: #38bdf8;
  --success: #0f9f6e;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.11);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--surface);
  color: var(--ink-700);
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Keep core content visible even when animation scripts are delayed or disabled. */
.portfolio-home [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

a {
  color: var(--brand);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(20, 73, 221, 0.3);
  outline-offset: 4px;
}

/* Sidebar */
#header {
  background:
    radial-gradient(circle at 20% 8%, rgba(56, 189, 248, 0.14), transparent 28%),
    linear-gradient(180deg, #091525 0%, #07111f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 18px;
  width: 290px;
}

#header .profile img {
  border: 3px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  height: 112px;
  object-fit: cover;
  width: 112px;
}

#header .profile h1 {
  font-family: "Poppins", sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 15px;
}

#header .profile .profile-role {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin: 4px 0 0;
  text-align: center;
  text-transform: uppercase;
}

#header .profile .social-links a {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

#header .profile .social-links a:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.nav-menu {
  padding-top: 28px;
}

.nav-menu > ul > li {
  margin-bottom: 5px;
}

.nav-menu a {
  border-radius: 10px;
  color: #a8b4c5;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 13px;
}

.nav-menu a i {
  color: #718096;
  font-size: 20px;
}

.nav-menu a:hover,
.nav-menu .active,
.nav-menu li:hover > a {
  background: rgba(20, 73, 221, 0.2);
  color: #fff;
}

.nav-menu a:hover i,
.nav-menu .active i,
.nav-menu li:hover > a i {
  color: #7dd3fc;
}

#main {
  margin-left: 290px;
  min-width: 0;
}

.mobile-nav-toggle {
  background: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

/* Shared section system */
section {
  overflow: clip;
  padding: 88px 0;
}

.section-bg,
.skills.section-bg {
  background: var(--surface-soft);
}

.container {
  max-width: 1160px;
}

.section-title {
  max-width: 760px;
  padding-bottom: 38px;
}

.section-title h2,
.skills .section-title h2 {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 750;
  letter-spacing: -1px;
  margin-bottom: 13px;
  padding-bottom: 0;
}

.section-title h2::after,
.skills .section-title h2::after {
  display: none;
}

.section-title p {
  color: var(--ink-600);
  font-size: 17px;
  line-height: 1.75;
}

.section-kicker {
  color: var(--brand);
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.button-primary,
.button-secondary {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  padding: 12px 18px;
}

.button-primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(20, 73, 221, 0.2);
}

.button-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.button-secondary:hover {
  background: #fff;
  color: var(--ink-900);
}

/* Hero */
#hero {
  background-position: center;
  box-sizing: border-box;
  margin-left: 290px;
  min-height: 100vh;
  padding: 80px clamp(28px, 7vw, 110px);
  position: relative;
  width: calc(100% - 290px);
}

#hero::before {
  background:
    linear-gradient(90deg, rgba(4, 12, 24, 0.95) 0%, rgba(4, 12, 24, 0.78) 53%, rgba(4, 12, 24, 0.4) 100%),
    linear-gradient(180deg, transparent 60%, rgba(4, 12, 24, 0.65) 100%);
}

#hero .hero-container {
  margin: 0;
  max-width: 820px;
  position: relative;
  width: 100%;
  z-index: 2;
}

.hero-kicker {
  align-items: center;
  color: #7dd3fc;
  display: flex;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-kicker::before {
  background: #7dd3fc;
  content: "";
  height: 2px;
  width: 34px;
}

#hero h1 {
  font-size: clamp(48px, 6vw, 78px);
  letter-spacing: -2.5px;
  line-height: 1.04;
  margin-bottom: 20px;
}

#hero p {
  color: #dbeafe;
  font-size: clamp(20px, 2.2vw, 29px);
  margin-bottom: 16px;
}

.hero-copy {
  color: #b8c6d9;
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 30px;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-metrics {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  gap: 38px;
  margin-top: 46px;
  padding-top: 24px;
}

.hero-metric strong {
  color: #fff;
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 22px;
}

.hero-metric span {
  color: #94a3b8;
  font-size: 13px;
}

/* About */
.about-heading {
  padding-bottom: 26px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 28px;
}

.about-top {
  display: block;
}

.about-role {
  color: var(--brand);
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.3px;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.about-content {
  align-items: center;
  display: grid;
  column-gap: clamp(32px, 5vw, 68px);
  grid-template-areas:
    "heading actions"
    "copy copy";
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 26px;
  padding: 8px;
}

.about-intro-heading,
.about-intro-copy {
  min-width: 0;
}

.about-intro-heading {
  grid-area: heading;
}

.about-intro-copy {
  display: block;
  grid-area: copy;
  max-width: 940px;
}

.about .content h3 {
  color: var(--ink-900);
  font-size: clamp(27px, 3vw, 35px);
  letter-spacing: -0.7px;
  line-height: 1.22;
  margin-bottom: 0;
}

.about .about-lead {
  color: var(--ink-600);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 0;
}

.about-copy {
  color: var(--ink-600);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 0;
}

.about-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 0;
  overflow: hidden;
}

.about-detail {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  gap: 10px;
  min-height: 76px;
  padding: 15px;
}

.about-detail:nth-child(3n + 1),
.about-detail:nth-child(3n + 2) {
  border-right: 1px solid var(--line);
}

.about-detail:nth-child(-n + 3) {
  border-bottom: 1px solid var(--line);
}

.about-detail > i {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 30px;
  font-size: 16px;
  height: 30px;
  justify-content: center;
}

.about-detail strong {
  color: var(--ink-900);
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  margin-bottom: 3px;
}

.about-detail span {
  color: var(--ink-600);
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-area: actions;
  justify-content: flex-end;
  margin-top: 0;
}

.about .about-contact-button {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  color: var(--ink-800);
}

.about .about-contact-button:hover {
  background: var(--surface-soft);
  border-color: #bdc9d8;
  color: var(--brand);
}

/* Skills */
.skill-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-group::before {
  display: none;
}

.skill-group:hover {
  background: var(--surface);
  border-color: #c3cfdd;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.skill-group h3 {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink-900);
  display: flex;
  font-size: 16px;
  gap: 10px;
  justify-content: flex-start;
  margin: 0;
  padding: 18px 20px;
}

.skill-group h3 > i {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 9px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 19px;
  height: 34px;
  justify-content: center;
}

.skill-chip-list {
  gap: 8px;
  padding: 18px 20px 20px;
}

.skill-chip {
  background: var(--surface);
  border: 1px solid #94a3b8;
  border-radius: 999px;
  box-shadow: none;
  color: var(--ink-800);
  font-family: "Open Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  min-height: 30px;
  padding: 4px 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.skill-chip i,
.skill-chip:visited {
  color: var(--ink-800);
}

.skill-chip > i,
.skill-chip > .skill-logo {
  align-items: center;
  background: transparent;
  border-radius: 0;
  color: var(--skill-icon-color, var(--ink-600));
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 16px;
  height: 18px;
  justify-content: center;
  margin-right: 5px;
  transition: none;
}

.skill-chip:hover {
  background: #f3f4f6;
  border-color: #334155;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.11);
  color: var(--ink-900);
  text-decoration: none;
  transform: translateY(-2px);
}

.skill-chip:hover i,
.skill-chip:hover .skill-logo {
  transform: none;
}

.skill-chip:focus-visible {
  background: #f3f4f6;
  border-color: #334155;
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.14);
  color: var(--ink-900);
  outline: 0;
}

.skill-chip:active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(0);
}

/* Experience */
.resume1 {
  background: var(--surface);
}

.resume1 .resume-title {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
  font-size: 28px;
  letter-spacing: -0.6px;
  margin: 0 0 30px;
}

.resume1 .resume1-item {
  border-left: 2px solid #cbd5e1;
  padding: 0 0 30px 28px;
}

.resume1 .resume1-item::before {
  background: var(--surface);
  border: 3px solid var(--brand);
  height: 15px;
  left: -8px;
  width: 15px;
}

.resume1 .resume1-item h4 {
  color: var(--ink-900);
  font-size: 19px;
  letter-spacing: 0;
  line-height: 1.35;
}

.resume1 .resume1-item h5 {
  background: var(--brand-soft);
  border-radius: 7px;
  color: var(--brand-dark);
  font-size: 13px;
  margin-right: 5px;
  padding: 6px 10px;
}

.resume1 .resume-project-title {
  color: var(--brand-dark);
  font-size: 15px;
}

.resume1 .resume1-item ul li {
  color: var(--ink-600);
  font-size: 14px;
  line-height: 1.65;
  padding-bottom: 9px;
}

.resume-education {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: 16px;
  padding: 24px 22px 4px;
}

.resume-education .resume-title {
  font-size: 22px;
  margin-bottom: 24px;
}

/* Project cards */
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  height: 100%;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.project-media {
  background: #e9eef5;
  height: 230px;
  overflow: hidden;
  position: relative;
}

.project-media img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  width: 100%;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-type {
  background: rgba(7, 17, 31, 0.86);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  left: 16px;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  position: absolute;
  text-transform: uppercase;
  top: 16px;
}

.project-body {
  padding: 23px;
}

.project-body h3 {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 9px;
}

.project-body p {
  color: var(--ink-600);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 17px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 19px;
}

.project-tags span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
}

.project-link {
  align-items: center;
  color: var(--brand);
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

/* Certifications and interests */
.credential-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 170px 1fr;
  height: 100%;
  overflow: hidden;
}

.credential-card img {
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  width: 100%;
}

.credential-content {
  padding: 25px;
}

.credential-content h3 {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

.credential-meta {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.credential-content p {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 1.65;
}

.interest-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.interest-item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-700);
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 10px;
  min-height: 66px;
  padding: 13px;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.interest-item i {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 9px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 21px;
  height: 36px;
  justify-content: center;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.interest-item:hover {
  background: var(--brand-soft);
  border-color: #aebee8;
  box-shadow: var(--shadow-sm);
  color: var(--ink-900);
  transform: translateY(-4px);
}

.interest-item:hover i {
  background: var(--brand);
  color: #fff;
  transform: scale(1.06);
}

/* Contact */
.contact-panel {
  background:
    radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.18), transparent 32%),
    var(--ink-900);
  border-radius: var(--radius-lg);
  color: #fff;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
}

.contact-panel h2 {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 750;
  letter-spacing: -1.2px;
}

.contact-panel p {
  color: #b8c6d9;
  max-width: 670px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.contact-detail-list {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  margin-top: 32px;
  padding-top: 22px;
}

.contact-detail-list a,
.contact-detail-list span {
  color: #dbeafe;
  font-size: 13px;
}

.site-footer {
  color: var(--ink-500);
  font-size: 13px;
  padding: 25px 0 35px;
  text-align: center;
}

/* Project detail pages */
.breadcrumbs {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  margin-top: 0;
  padding: 30px 0;
}

.breadcrumbs h2 {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.portfolio-details {
  background: var(--surface-soft);
}

.portfolio-details .container > .row {
  align-items: start;
  justify-content: center;
}

.portfolio-details .portfolio-details-slider,
.portfolio-details .portfolio-info,
.portfolio-details .portfolio-description {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.portfolio-details .portfolio-details-slider img {
  background: #edf1f6;
  height: 430px !important;
  object-fit: contain;
  width: 100%;
}

.portfolio-details .portfolio-info,
.portfolio-details .portfolio-description {
  padding: 26px;
}

.portfolio-details .portfolio-info .portfolio-description,
.portfolio-details .portfolio-description .portfolio-info {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.portfolio-details .portfolio-info h3,
.portfolio-details .portfolio-description h2 {
  color: var(--ink-900);
  font-family: "Poppins", sans-serif;
}

.portfolio-details .portfolio-info ul li {
  border-bottom: 1px solid #edf1f5;
  line-height: 1.65;
  padding: 10px 0;
}

.portfolio-details .portfolio-info ul li:last-child {
  border-bottom: 0;
}

.back-to-top {
  background: var(--brand);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1199px) {
  #header {
    left: -290px;
    width: 290px;
  }

  #main {
    margin-left: 0;
  }

  #hero {
    margin-left: 0;
    padding-left: clamp(24px, 7vw, 80px);
    width: 100%;
  }
}

@media (max-width: 991px) {
  section {
    padding: 70px 0;
  }

  .about-card {
    padding: 24px;
  }

  .about-content {
    padding: 0;
  }

  .interest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #hero {
    align-items: flex-start !important;
    justify-content: center;
  }

  #hero h1 {
    letter-spacing: -1.5px;
  }

  .hero-metrics {
    gap: 20px;
  }

  .about-content,
  .about-details,
  .interest-list {
    grid-template-columns: 1fr;
  }

  .about-content {
    gap: 22px;
    grid-template-areas:
      "heading"
      "actions"
      "copy";
    grid-template-rows: auto;
  }

  .about-actions {
    justify-content: flex-start;
    margin-top: 0;
    width: 100%;
  }

  .about-actions a {
    justify-content: center;
    width: 100%;
  }

  .about-detail:nth-child(3n + 1),
  .about-detail:nth-child(3n + 2) {
    border-right: 0;
  }

  .about-detail:nth-child(-n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .about-detail:last-child {
    border-bottom: 0;
  }

  .credential-card {
    grid-template-columns: 1fr;
  }

  .credential-card img {
    max-height: 220px;
    min-height: 0;
  }

  .portfolio-details .portfolio-details-slider img {
    height: 300px !important;
  }
}

@media (max-width: 480px) {
  section {
    padding: 58px 0;
  }

  #hero {
    padding: 80px 22px 50px;
  }

  .about-heading {
    padding-bottom: 20px;
  }

  .about-card {
    border-radius: 18px;
    padding: 14px;
  }

  .about-content {
    padding: 8px 8px 4px;
  }

  .about .content h3 {
    font-size: 26px;
  }

  .hero-actions,
  .hero-actions a {
    width: 100%;
  }

  .hero-metrics {
    flex-direction: column;
    gap: 12px;
  }

  .project-media {
    height: 205px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
