/**
* Modernized portfolio styles
*/

:root {
  --bg: #f7f7f7;
  --bg-soft: #eeeeee;
  --surface: rgba(255, 253, 246, 0.86);
  --surface-strong: #f7f7f7;
  --surface-dark: #3f3f46;
  --text: #4b5563;
  --muted: #6b7280;
  --heading: #1f2937;
  --line: rgba(107, 114, 128, 0.28);
  --primary: #9ca3af;
  --primary-deep: #6b7280;
  --secondary: #4b5563;
  --secondary-soft: #e5e7eb;
  --accent: #d1d5db;
  --shadow-lg: 0 24px 60px rgba(31, 41, 55, 0.14);
  --shadow-md: 0 16px 32px rgba(31, 41, 55, 0.1);
  --shadow-sm: 0 8px 18px rgba(31, 41, 55, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(209, 213, 219, 0.28), transparent 32%),
    radial-gradient(circle at bottom right, rgba(107, 114, 128, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f7f7 0%, #eeeeee 48%, #f7f7f7 100%);
  line-height: 1.7;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(75, 85, 99, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 85, 99, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 92%);
  z-index: -1;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

a:hover {
  color: var(--primary-deep);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--heading);
  letter-spacing: -0.03em;
}

p {
  color: var(--muted);
}

img {
  max-width: 100%;
  display: block;
}

/*--------------------------------------------------------------
# Back to top
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 22px;
  bottom: 22px;
  z-index: 996;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary-deep));
  box-shadow: 0 16px 28px rgba(75, 85, 99, 0.24);
  transition: all 0.35s ease;
}

.back-to-top i {
  font-size: 30px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  transform: translateY(-4px);
  color: #fff;
}

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

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 22px;
  left: 22px;
  bottom: 22px;
  width: 308px;
  z-index: 9997;
  padding: 18px;
  border: 1px solid rgba(107, 114, 128, 0.32);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(245, 245, 245, 0.96) 0%, rgba(209, 213, 219, 0.9) 100%);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transition: all 0.45s ease;
}

.sidebar-shell {
  min-height: 100%;
  justify-content: space-between;
}

#main {
  margin-left: 360px;
  padding: 28px 22px 36px 0;
}

.container,
.container-fluid {
  padding-left: 18px;
  padding-right: 18px;
  max-width: 1240px;
}

/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/
.nav-menu {
  padding: 12px 0 0;
}

.nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > ul {
  display: grid;
  gap: 8px;
}

.nav-menu > ul > li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a,
.nav-menu a:focus {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(47, 63, 36, 0.72);
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
}

.nav-menu a i,
.nav-menu a:focus i {
  font-size: 20px;
  color: rgba(102, 127, 71, 0.72);
}

.nav-menu a:hover,
.nav-menu .active,
.nav-menu .active:focus,
.nav-menu li:hover > a {
  color: var(--heading);
  background: rgba(255, 253, 246, 0.72);
}

.nav-menu a:hover i,
.nav-menu .active i,
.nav-menu .active:focus i,
.nav-menu li:hover > a i {
  color: var(--primary-deep);
}

.mobile-nav-toggle {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 9998;
  border: 0;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(75, 85, 99, 0.24);
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active #header {
  left: 18px;
}

/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
section {
  position: relative;
  padding: 26px 0;
  overflow: visible;
}

.section-bg {
  background: transparent;
}

.section-title {
  padding-bottom: 26px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section-title h2 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.02;
  margin: 0 0 14px;
}

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

.section-title p {
  max-width: 780px;
  margin: 0;
  font-size: 1rem;
}

/*--------------------------------------------------------------
# Profile Hero
--------------------------------------------------------------*/
.profile-hero {
  display: block;
}

.profile-hero-copy {
  position: relative;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(107, 114, 128, 0.22);
  box-shadow: var(--shadow-lg);
}

.profile-hero-copy {
  overflow: hidden;
}

.profile-hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(209, 213, 219, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(255, 253, 246, 0.68), rgba(255, 253, 246, 0));
  pointer-events: none;
}

.profile-hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-hero-intro {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-hero-avatar {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 28px;
  border: 4px solid rgba(255, 253, 246, 0.9);
  box-shadow: 0 20px 32px rgba(31, 41, 55, 0.14);
}

.profile-hero-identity h2 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  line-height: 1.05;
}

.profile-hero-identity p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.98rem;
  font-weight: 700;
}

.profile-hero-social {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-hero-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.92);
  border: 1px solid rgba(107, 114, 128, 0.28);
  box-shadow: var(--shadow-sm);
  color: var(--secondary);
  font-size: 20px;
}

.profile-hero-social a:hover {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--heading);
  transform: translateY(-2px);
}

.profile-summary {
  position: relative;
  max-width: 62ch;
  margin: 0;
  font-size: 1.02rem;
}

.hero-highlights {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.88);
  border: 1px solid rgba(107, 114, 128, 0.26);
  box-shadow: var(--shadow-sm);
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 700;
}

/*--------------------------------------------------------------
# Resume
--------------------------------------------------------------*/
.resume .row {
  row-gap: 26px;
}

.resume-column {
  display: grid;
  align-content: start;
  gap: 6px;
}

.resume .resume-title {
  font-size: 1.45rem;
  margin: 10px 0 14px;
}

.resume .resume-item {
  padding: 24px 24px 22px 30px;
  margin-top: 0;
  border-left: 2px solid rgba(107, 114, 128, 0.42);
  position: relative;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(107, 114, 128, 0.18);
  border-right: 1px solid rgba(107, 114, 128, 0.18);
  border-bottom: 1px solid rgba(107, 114, 128, 0.18);
  box-shadow: var(--shadow-md);
}

.resume .resume-item h4 {
  line-height: 1.25;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: none;
  margin-bottom: 10px;
}

.resume .resume-item h5 {
  font-size: 0.88rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(209, 213, 219, 0.52);
  color: var(--secondary);
  margin-bottom: 12px;
}

.resume .resume-item p,
.resume .resume-item li {
  color: var(--muted);
}

.resume .resume-item ul {
  margin: 0;
  padding-left: 18px;
}

.resume .resume-item ul li {
  padding-bottom: 8px;
}

.resume .resume-item:last-child {
  padding-bottom: 22px;
}

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: -8px;
  top: 26px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 6px rgba(107, 114, 128, 0.18);
  border: 0;
}

/*--------------------------------------------------------------
# Skills
--------------------------------------------------------------*/
.skills .row {
  row-gap: 22px;
}

.skills .progress {
  height: auto;
  display: block;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid rgba(107, 114, 128, 0.18);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.skills .progress + .progress {
  margin-top: 16px;
}

.skills .progress .skill {
  margin: 0 0 14px;
  text-transform: none;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--heading);
  font-size: 0.98rem;
}

.skills .progress .skill .val {
  float: right;
  color: var(--primary-deep);
  font-weight: 800;
}

.skills .progress-bar-wrap {
  background: rgba(107, 114, 128, 0.2);
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.skills .progress-bar {
  width: 1px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/*--------------------------------------------------------------
# Project
--------------------------------------------------------------*/
.portfolio .col-lg-12 {
  display: grid;
  gap: 24px;
}

.portfolio .resume-item {
  margin-bottom: 0 !important;
  padding: 28px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid rgba(107, 114, 128, 0.18);
  box-shadow: var(--shadow-lg);
}

.portfolio .resume-item::before {
  display: none;
}

.portfolio .resume-item h4 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.portfolio .resume-item em {
  color: var(--muted);
}

.portfolio .resume-item > div:first-of-type {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.portfolio .resume-item > div:first-of-type a img {
  height: 42px;
  width: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.image-grid > div {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #eeeeee;
  border: 1px solid rgba(107, 114, 128, 0.22);
  box-shadow: var(--shadow-sm);
}

.image-grid img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: zoom-in;
}

.image-grid > div:hover img {
  transform: scale(1.03);
  filter: none;
}

#dynamic-grid-doc {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

#dynamic-grid-doc img {
  min-height: 180px;
  object-fit: contain;
  background: #f7f7f7;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  padding: 24px;
  background: rgba(31, 41, 55, 0.78);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.modal img {
  max-width: min(1180px, 92vw);
  max-height: 88vh;
  border-radius: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  background: #f7f7f7;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/
#downloadButton {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
}

#downloadButton:hover {
  background-color: var(--primary-deep);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 1399px) {
  #header {
    width: 290px;
  }

  #main {
    margin-left: 334px;
  }
}

@media (max-width: 1199px) {
  #header {
    left: calc(-100% - 32px);
    top: 18px;
    bottom: 18px;
  }

  #main {
    margin-left: 0;
    padding: 86px 0 28px;
  }

  .container,
  .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }

}

@media (max-width: 991px) {
  .section-title h2 {
    font-size: 2.35rem;
  }

  .profile-hero-copy,
  .portfolio .resume-item,
  .resume .resume-item {
    padding: 24px;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 767px) {
  body::before {
    background-size: 28px 28px;
  }

  #header {
    width: calc(100% - 36px);
    border-radius: 26px;
  }

  .mobile-nav-active #header {
    left: 18px;
  }

  .mobile-nav-toggle {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  section {
    padding: 18px 0;
  }

  .section-title {
    padding-bottom: 18px;
  }

  .section-title h2 {
    font-size: 1.95rem;
  }

  .profile-hero-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .profile-hero-avatar {
    width: 92px;
    height: 92px;
    border-radius: 24px;
  }

  .profile-hero-social {
    justify-content: flex-start;
  }

  .portfolio .resume-item > div:first-of-type a img {
    height: 38px;
  }

  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .image-grid img,
  #dynamic-grid-doc img {
    min-height: 150px;
  }

  .modal {
    padding: 14px;
  }

  .modal img {
    max-width: 100%;
    border-radius: 18px;
  }
}

@media (max-width: 575px) {
  #main {
    padding-top: 80px;
  }

  .profile-hero-copy,
  .portfolio .resume-item,
  .resume .resume-item,
  .skills .progress {
    padding: 20px;
    border-radius: 20px;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .hero-highlights span {
    width: 100%;
    justify-content: center;
  }

  .resume .resume-item {
    padding-left: 24px;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .image-grid img,
  #dynamic-grid-doc img {
    min-height: 190px;
  }
}


/* Accessibility: respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Simple CV layout: keep the content readable and the visual tone restrained. */
:root {
  --bg: #f7f7f3;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #334155;
  --muted: #64748b;
  --heading: #1e293b;
  --line: #e2e8f0;
  --primary: #9ca3af;
  --primary-deep: #6b7280;
  --secondary: #4b5563;
  --accent: #e5e7eb;
  --shadow-lg: 0 12px 30px rgba(30, 41, 59, 0.06);
  --shadow-md: 0 8px 20px rgba(30, 41, 59, 0.05);
  --shadow-sm: 0 4px 12px rgba(30, 41, 59, 0.04);
}

body {
  background: var(--bg);
  line-height: 1.65;
}

body::before {
  display: none;
}

#header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.nav-menu a,
.nav-menu a:focus {
  color: var(--muted);
  border-radius: 10px;
}

.nav-menu a:hover,
.nav-menu .active,
.nav-menu .active:focus,
.nav-menu li:hover > a {
  color: var(--heading);
  background: var(--accent);
}

section {
  padding: 36px 0;
}

.section-title {
  padding-bottom: 20px;
}

.section-title h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.profile-hero-copy,
.resume .resume-item,
.skills .progress,
.portfolio .resume-item {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}

.profile-hero-copy {
  padding: 32px;
}

.profile-hero-copy::before {
  display: none;
}

.profile-hero-avatar {
  border-color: var(--accent);
  box-shadow: none;
}

.profile-summary,
.section-title p,
.resume .resume-item p,
.resume .resume-item li {
  color: var(--muted);
}

.hero-highlights span {
  background: var(--accent);
  border: 0;
  box-shadow: none;
  color: var(--secondary);
}

.resume .resume-item {
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  box-shadow: none;
}

.resume .resume-item h5 {
  display: inline-block;
  background: var(--accent);
}

.skills .progress {
  box-shadow: none;
  border-radius: 12px;
}

.portfolio .resume-item {
  border-radius: 16px;
  box-shadow: none;
}

@media (max-width: 1199px) {
  #header {
    border-radius: 18px;
  }
}


/* Portfolio gallery refinement */
.portfolio .resume-item {
  margin-bottom: 2rem !important;
  padding: clamp(1.25rem, 2vw, 2rem);
  border: 1px solid rgba(37, 45, 69, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.portfolio .resume-item h4 {
  margin-bottom: 0.75rem;
  color: var(--heading-color);
}

.portfolio .resume-item > div[style*="margin-bottom"] {
  margin-bottom: 1rem !important;
}

.portfolio .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.portfolio .image-grid > div {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(37, 45, 69, 0.08);
  border-radius: 12px;
  background: #f3f4f6;
}

.portfolio .image-grid img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0.35rem;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 180ms ease, background-color 180ms ease;
}

.portfolio .image-grid img:hover {
  background: #ffffff;
  transform: scale(1.03);
}

@media (max-width: 575px) {
  .portfolio .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio .image-grid img {
    transition: none;
  }
}
