
* { box-sizing: border-box }
html, body { height: 100% }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: 100px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot-color) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  color: var(--text);
  overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor * {
  cursor: none !important;
}

.custom-cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  background-color: var(--hover-tech-text);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease-out, opacity 0.15s ease-out;
  opacity: 0;

  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="%23000000"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="%23000000"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
  
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.custom-cursor.is-clicked {
  transform: translate(-50%, -50%) scale(0.8);
}

.custom-cursor.is-clickable {
  transform: translate(-50%, -50%) scale(1.3);
  background-color: #bf708a;
}
section[id] {
  scroll-margin-top: 120px;
}


:root {
  --clean-white: #f3f3f3;
  --soft-peach: #FFDAB9;
  --muted-rose: #C59AA8; 
  --slate-gray: #4A585A; 
  --pale-violet: #D1C5DE; 
  --desert-sand: #fee7aa;
  --dot-color: #dcdcdc; 

  --bg: var(--clean-white);
  --alt-bg: #FFFFFF;
  --text: var(--slate-gray);
  --text-secondary: #6B7A7D; 

  --card-bg: #FFFFFF;
  --border: var(--pale-violet);

  --title-start: var(--soft-peach);
  --title-end: var(--muted-rose);
  --hero-title-start: #ffc77e; 
  --hero-title-end: #d49cbc;  
  --accent: var(--muted-rose);

  --header-bg: #f9cea9;
  --header-text: #ffffff;

  --footer-bg: var(--desert-sand);
  --footer-text: #ffffff;

  --hover-lilac: var(--pale-violet);
  --subtitle-hover: var(--soft-peach);
  --hover-tech-text: #ffbd76;
  --hover-tech-bg: #ffd3b3;
  --hover-tech-text-color: #fff;
  --sunset-orange: #ffb892;
}

html[data-theme="dark"] {
  --hover-tech-text-color: #000;
  --charcoal-base: #2A2F34;
  --dusty-pink: #EBC8D6;
  --silver-mist: #EBEBEB;
  --soft-lilac: #C8B6E3;
  --deep-ochre: #C8A425;
  --dot-color: #22262a;

  --bg: var(--charcoal-base);
  --alt-bg: #353b41;
  --text: var(--silver-mist);
  --text-secondary: #D6D6D8;

  --card-bg: #32373C;
  --border: var(--soft-lilac);

  --title-start: var(--sunset-orange);
  --title-end: var(--dusty-pink);
  --hero-title-start: var(--title-start);
  --hero-title-end: var(--title-end);
  --accent: var(--deep-ochre);

  --soft-lilac-dark: #b7949f;
  --header-bg: var(--soft-lilac-dark);
  --header-text: var(--silver-mist);

  --footer-bg: var(--dusty-pink);
  --footer-text: var(--charcoal-base);

  --hover-lilac: var(--soft-lilac);
  --subtitle-hover: var(--soft-lilac);
  --hover-tech-text: var(--sunset-orange);
  --hover-tech-bg: #ffd3b3;

  --about-title-dark: #FFD2A6;
}

:root { --hover-lilac: var(--pale-violet) }
html[data-theme="dark"] { --hover-lilac: var(--soft-lilac) }


.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}


.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  border-bottom: none;
  z-index: 50;
  color: var(--header-text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .brand { color: var(--header-text) }
.header .nav-links a { color: var(--header-text) }

.header .icon-btn {
  border-color: rgba(255,255,255,.35);
  color: var(--header-text);
}

.header .icon-btn:hover { background: rgba(255,255,255,.12) }

.header .btn.small {
  background: #fff;
  color: var(--header-bg);
  border-color: #fff;
}


.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 18px;
  text-decoration: none;
  border-bottom: none;
}

.nav-links {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  opacity: .9;
  border-bottom: 0;
  font-weight: bold;
  font-size: 15px;
}

.dropdown-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--header-bg);
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  list-style: none;
  z-index: 100;
  border: 1px solid var(--border);
}

.dropdown-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  display: block;
  width: 100%;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 14px;
  color: var(--header-text);
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
  width: 100%;
  font-weight: bold;
}

.dropdown-menu li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
  transform: none;
}

.nav-actions {
  display: flex;
  gap: 8px;
}


.icon-btn {
  height: 38px;
  min-width: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { background: rgba(255,255,255,.06) }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.header .btn.small:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.small {
  padding: 8px 12px;
  font-size: 14px;
}


.hero {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 6px;
  align-items: center;
  padding: 48px 0;
}

.hero .hero-text { text-align: center }

.title {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(90deg, var(--hero-title-start), var(--hero-title-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 12px 0 20px;
}

.actions {
  display: flex;
  gap: 12px;
}

.hero-photo {
  display: flex;
  justify-content: center;
  margin-top: -10px;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}


.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 20px 0;
  width: fit-content;
  background: linear-gradient(90deg, var(--title-start), var(--title-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


.about {
  padding: 48px 0;
}

.about-content {
  max-width: 870px;
  margin: 0 auto;
}

.about-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 16px 0 0;
}

.lead { color: var(--text-secondary); max-width: 70ch }


.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 14px;
}


.timeline { padding: 40px 0 }

.timeline-list {
  position: relative;
  margin-left: 12px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  padding: 10px 0;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  top: 6px;
}

.date { font-weight: 600; opacity: .8 }
.desc { color: var(--text-secondary) }


.projects {
  padding: 60px 0;
  background: var(--alt-bg);
  position: relative;
}

.timeline {
  padding: 40px 0;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 1.2s ease, color 0.3s ease;
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none; 
  pointer-events: none;
  z-index: 1;
}

.card:hover::after {
  left: 125%;
  transition: left 1s ease-in-out;
}


.card-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.meli-logo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: none;
}


.current-role {
  padding: 48px 0;
}

.about {
  padding: 48px 0;
}

.about-title {
  margin: 0 0 24px;
  text-align: left;
}

.about-card {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 32px 24px 40px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--title-start), var(--title-end));
  opacity: 0.8;
}

.about-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.about-content {
  position: relative;
  z-index: 2;
}

.about-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  font-size: 15px;
  position: relative;
  padding-left: 12px;
}

.about-text::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.experience-card {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 32px 16px 40px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--title-start), var(--title-end));
  opacity: 0.8;
}

.experience-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.experience-title {
  margin: 0 0 24px;
  text-align: center;
}

.experience-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.experience-logo {
  flex-shrink: 0;
  margin-left: 24px;
}

.experience-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.experience-role {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

.experience-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.meli-company {
  font-size: 18px;
  color: #FFD700;
  font-weight: 700;
}

.experience-location {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  opacity: 0.9;
}

.experience-list {
  margin: 12px 0 0;
  padding-left: 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.experience-list li {
  margin-bottom: 6px;
  position: relative;
}

.experience-list li::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 7px;
  width: 5px;
  height: 5px;
  background-color: var(--accent);
  border-radius: 50%;
}

.experience-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-tags .chip {
  background: linear-gradient(135deg, var(--soft-lilac) 0%, var(--hover-lilac) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #000;
  font-weight: 500;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.experience-tags .chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, var(--hover-lilac) 0%, var(--title-start) 100%);
}


.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.card-subtitle {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.95rem;
}


.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--soft-lilac);
  color: #000;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}


.card-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-buttons-top {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.action-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.action-buttons-top .icon-btn.medium {
  height: 40px;
  min-width: 40px;
  width: 40px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none; 
  border-bottom: 1px solid var(--border); 
}

.action-buttons-top .icon-btn.medium:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 6px 10px;
  background: var(--header-bg);
  color: var(--header-text);
  font-size: 12px;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 10;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

html[data-theme="dark"] .project-card:hover .action-buttons-top .icon-btn.medium {
  border-color: var(--sunset-orange);
  color: var(--sunset-orange);
}

html[data-theme="dark"] .action-buttons-top .icon-btn.medium:hover {
  background: var(--dusty-pink);
  border-color: var(--dusty-pink);
  color: var(--charcoal-base);
}

.project-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.demo-btn {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
}

.demo-btn i {
  font-size: 18px;
  color: #ff0000;
}

.demo-text {
  margin-left: 8px;
  font-weight: 500;
}

.demo-btn:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.05);
  color: #ff0000;
}


.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
  background-color: var(--hover-lilac);
}

.card:hover .chip {
  background-color: var(--hover-tech-bg);
  color: var(--hover-tech-text-color);
  border-color: var(--hover-tech-bg);
}


.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


.stack {
  padding: 60px 0;
  background: var(--alt-bg);
  position: relative;
}


.group-title {
  font-family: 'Playfair Display', serif;
  margin: 10px 0 16px;
  font-size: 22px;
  color: var(--text);
}


.stack {
  padding: 40px 0;
  position: relative;
  z-index: 10;
}

.stack-group {
  margin-bottom: 32px;
}


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


.stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: default;
  transition: 
    transform .25s ease,
    background .25s ease,
    box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}

.stack-item.visible-scroll {
  animation: float 5s ease-in-out infinite;
  animation-delay: 0.6s;
}

.stack-item:nth-child(2n).visible-scroll {
  animation-duration: 6s;
  animation-delay: 1.1s;
}

.stack-item:nth-child(3n).visible-scroll {
  animation-duration: 7s;
  animation-delay: 1.6s;
}

.stack-item:nth-child(4n).visible-scroll {
  animation-duration: 5.5s;
  animation-delay: 2.1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.stack-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.stack-item:hover::after {
  left: 125%;
  transition: left 0.6s ease-in-out;
}


.stack-item i {
  font-size: 26px;
  width: 32px;
  text-align: center;
  color: var(--accent);
}

.stack-item i.devicon-angular-plain.colored {
  color: #dd0031;
}


.stack-item:hover {
  background: var(--hover-lilac);
  transform: translateY(-12px);
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
  animation: none;
}


.stack-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


.contact { padding: 40px 0 }

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .contact-links { justify-content: center }

.link {
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.link i {
  font-size: 22px;
  display: inline-block;
  transform-origin: center;
}


.link:hover i {
  color: var(--accent);
  transform: scale(1.12);
}

.contact-links .link i,
.footer .link i {
  font-size: 30px;
}

.contact-links .link:hover i,
.footer .link:hover i {
  transform: scale(1.25);
}


.footer .link { border-bottom: none }
.footer .link { color: var(--footer-text) }

.footer {
  position: relative;
  z-index: 10;
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: none;
  padding: 12px 0;
  margin-top: 0;
  text-align: center;
}

.footer .section-title {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--footer-text);
  margin: 0 auto 8px;
}

.footer .contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}


.btn, .icon-btn, .chip, .card, .nav-links a, .link, .avatar, .title, .subtitle {
  transition: all .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.btn.primary:hover { filter: brightness(1.05) }
.nav-links a:hover { color: var(--accent); transform: translateY(-1px) }

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  background: var(--hover-lilac);
}

.chip:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.contact-links .link:hover,
.footer .link:hover { transform: none }

.avatar:hover {
  box-shadow: 0 0 0 4px var(--border);
  transform: scale(1.02);}

.icon-btn:hover { transform: translateY(-1px) }

#lang-toggle, #theme-toggle { font-size: 18px }

.title:hover { transform: scale(1.02) }
.subtitle:hover { color: var(--subtitle-hover); transform: translateY(-1px) }


.link::before {
  font-size: 22px;
  line-height: 1;
  margin-right: 6px;
}

.link[data-icon="mail"]::before { content: "✉️" }
.link[data-icon="linkedin"]::before { content: "🔗" }
.link[data-icon="github"]::before { content: "🐙" }



.resaltar {
  color: #FFB085;
  font-weight: bold;
}



.menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center }
  .hero-photo { order: -1 }
  .grid { grid-template-columns: 1fr 1fr }
  .stack-grid { grid-template-columns: 1fr 1fr }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 768px) {
  .experience-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  
  .experience-logo {
    margin-left: 0;
    margin-bottom: 16px;
    align-self: center;
  }
  
  .experience-body {
    width: 100%;
    align-items: center;
  }
  
  .experience-list {
    text-align: left;
    display: inline-block;
  }

  .menu-toggle { display: block }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    overflow-y: auto;
    background: var(--header-bg);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
  }

  .nav-menu.active { transform: translateY(0) }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 24px;
  }
  
  .nav-links li a {
    font-size: 18px;
    padding: 8px 16px;
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .nav-actions {
    margin-top: 10px;
    display: flex;
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .hero, .about, .projects, .timeline, .current-role, .stack, .contact {
    padding: 32px 0;
  }
  .section-title { font-size: 28px }
  
  .grid { grid-template-columns: 1fr }
  .stack-grid { grid-template-columns: 1fr }
  .title { font-size: 42px }
  
  .about-card, .experience-card {
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .avatar { width: 160px; height: 160px }
  .title { font-size: 36px }
}


html[data-theme="dark"] .view-more-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--soft-lilac);
  color: var(--text);
  font-weight: 500;
}

html[data-theme="dark"] .view-more-btn:hover {
  background: rgba(191, 112, 138, 0.6); 
  border-color: rgba(191, 112, 138, 0.6);
  color: #fff;
}

html[data-theme="dark"] .card:hover .view-more-btn:not(:hover) {
  background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), var(--card-bg);
  border-color: var(--soft-lilac);
  color: var(--text);
}


.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-action-btn i {
  font-size: 18px;
}




body.modal-open, body.menu-open {
  overflow: hidden;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}


.modal.is-open {
  opacity: 1;
  visibility: visible;
}


.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: -1;
}


.modal-panel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.is-open .modal-panel {
  transform: scale(1);
}


.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}

.modal-header-left {
  flex: 1;
}

.modal-title {
  margin: 0;
  font-size: 32px;
  color: var(--header-text);
  font-family: 'Playfair Display', serif;
}

.modal-meta {
  font-size: 14px;
  color: var(--header-text);
  opacity: 0.9;
  margin-top: 4px;
}

.modal-meta .card-subtitle {
  display: inline;
  margin: 0;
  font-size: 14px;
}

.modal-close {
  font-size: 24px;
  padding: 12px;
  height: 48px;
  width: 48px;
  min-width: 48px;
  border: none;
  background: transparent;
  color: var(--header-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255,255,255,0.2);
}


.modal-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}


.modal-media {
  padding: 24px;
  background: rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-right: 1px solid var(--border);
}

.modal-media .modal-section {
  margin-top: 24px;
  text-align: center;
  width: 100%;
}

.modal-media .tags {
  justify-content: center;
}

@media (max-width: 768px) {
  .modal-media {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
}


.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.carousel-viewport {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: transparent;
  height: auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  width: 100%;
  height: auto;
  max-height: 650px;
  object-fit: contain;
  display: block;
}

.carousel-btn {
  width: 32px;
  height: 32px;
  min-width: 32px; 
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

html[data-theme="dark"] .carousel-btn:hover {
  background: rgba(191, 112, 138, 0.6); 
  border-color: rgba(191, 112, 138, 0.6);
  color: #fff;
  
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}


.modal-content {
  padding: 24px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

html[data-theme="dark"] .modal-section-title {
  color: var(--about-title-dark);
}

.modal-text {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  font-size: 15px;
}

.modal-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.modal-list li {
  margin-bottom: 6px;
}


.hidden-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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


.wave-divider-top {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  margin-bottom: -1px;
}

.wave-divider-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.wave-divider-top .shape-fill {
  fill: var(--alt-bg);
}

.wave-fill-dark {
  background: var(--alt-bg);
}

.wave-fill-dark .shape-fill {
  fill: var(--bg) !important;
}

.wave-divider-bottom {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.wave-divider-bottom .shape-fill {
  fill: var(--alt-bg);
}

.wave-stack {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
  background: var(--alt-bg);
}

.wave-stack svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.wave-stack .shape-fill {
  fill: var(--bg);
}

.wave-stack-bottom {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}

.wave-stack-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.wave-stack-bottom .shape-fill {
  fill: var(--alt-bg);
}

html[data-theme="dark"] .card-subtitle {
  color: var(--dusty-pink);
}

html[data-theme="dark"] .card:hover {
  color: #FFFFFF;
}

html[data-theme="dark"] .card:hover .card-title,
html[data-theme="dark"] .card:hover .card-desc,
html[data-theme="dark"] .card:hover .project-date {
  color: #FFFFFF;
}

.card-title, .card-desc, .project-date {
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .header {
    height: 60px;
  }
  
  .nav {
    height: 60px;
  }
  
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  
  .nav-menu.active { transform: translateY(0) }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 24px;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 10px;
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .nav-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 30px 0 20px; 
    gap: 15px;
    min-height: auto;
  }
  
  .hero-photo {
    margin-top: 10px;
    margin-bottom: 15px;
    order: -1; 
    order: 0; 
  }

  .hero .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero .hero-text .title {
    font-size: 2.2rem;
    margin-bottom: 8px;
    line-height: 1.2;
    order: 1;
  }
  
  .hero .hero-text .subtitle {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    padding: 0 10px;
    order: 2;
  }

  .hero .contact-links {
    order: 3;
    margin-top: 10px;
  }
  
  .hero-photo .avatar {
    width: 130px;
    height: 130px;
    border-width: 3px;
    margin-bottom: 10px;
  }

  .contact-links {
    gap: 24px;
  }

  .contact-links .link {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .contact-links .link i {
    font-size: 28px;
  }

  .card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
  }
  
  .card-image img {
    height: 160px; 
  }
  
  .card-content {
    padding: 12px 4px 4px;
    gap: 10px;
  }
  
  .card-title {
    font-size: 1.3rem;
  }
  
  .card-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch; 
    margin-top: 15px;
  }
  
  .view-more-btn {
    width: 100%;
    justify-content: center;
    padding: 14px; 
    font-size: 1rem;
    min-height: 48px;
  }
  
  .project-date {
    text-align: center;
    order: 2;
    font-size: 0.85rem;
    opacity: 0.8;
    padding: 5px;
  }
  
  .about-text, .card-desc, .timeline-item .desc, .modal-text, .modal-list {
    line-height: 1.75;
    margin-bottom: 20px;
    font-size: 1rem;
  }
  
  .about-card {
    padding: 24px 20px;
  }

  .timeline-item {
    gap: 15px;
    padding-bottom: 25px;
    grid-template-columns: 20px 1fr; 
  }
  
  .timeline-list::before {
    left: 9px; 
  }
  
  .timeline-item .dot {
    width: 14px;
    height: 14px;
    left: 2px;
  }

  .stack-group {
    margin-bottom: 30px; /
  }

  .stack-grid {
    gap: 15px;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stack-item {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 16px;
    gap: 10px;
    min-height: 90px;
  }
  
  .stack-item i {
    font-size: 36px; 
    width: auto;
    margin-bottom: 5px;
  }
  
  .stack-item span {
    font-size: 0.9rem;
  }

  .modal {
    padding: 0;
  }
  
  .modal-panel {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: none !important; 
  }
  
  .modal-header {
    padding: 16px;
  }
  
  .modal-title {
    font-size: 24px;
  }
  
  .carousel-viewport {
    min-height: 200px;
  }
  
  .modal-media {
    padding: 16px;
  }
  
  .modal-close {
    padding: 10px; 
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero .hero-text .title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .stack-grid {
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .hero-photo .avatar {
    width: 120px;
    height: 120px;
  }
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--header-bg); 
  border: 1px solid var(--header-bg);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 8px 0;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  list-style: none;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: var(--header-text); 
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.3); 
  color: var(--header-text);
  transform: none;
}

.nav-item.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.wave-certificados {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  margin-bottom: -1px;
}

.wave-certificados svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.wave-certificados .shape-fill {
  fill: var(--alt-bg);
}

.certificados {
  padding: 60px 0;
  background: var(--alt-bg);
  position: relative;
}

.cert-carousel-container {
  position: relative;
  margin-top: 30px;
  padding: 0 60px; 
}

.cert-carousel-track-container {
  overflow: hidden;
  margin: 0 -10px; 
  padding: 10px; 
}

.cert-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-card {
  flex: 0 0 calc((100% - 80px) / 5); 
  position: relative;
  transition: all 0.3s ease;
  background: var(--card-bg);
  border-radius: 14px; 
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  padding: 15px;
  cursor: pointer;
  height: auto;
  min-height: 180px; 
  overflow: hidden; 
  margin-right: 20px;
  animation: float 6s ease-in-out infinite;
}

.cert-card:nth-child(2n) {
  animation-duration: 7s;
  animation-delay: 1s;
}

.cert-card:nth-child(3n) {
  animation-duration: 5.5s;
  animation-delay: 2s;
}

.cert-card:nth-child(5n) {
  animation-duration: 6.5s;
  animation-delay: 0.5s;
}

.cert-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.cert-card:hover::after {
  left: 125%;
  transition: left 1s ease-in-out;
}

.cert-img-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.cert-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='white'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.cert-img-wrapper:hover::after {
  opacity: 1;
}

.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

.cert-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: var(--text);
  line-height: 1.3;
}

.cert-card:hover {
  animation-play-state: paused;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border-color: var(--accent);
  background-color: var(--hover-lilac); 
  z-index: 10;
}

.cert-prev-btn,
.cert-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.cert-prev-btn { left: 0; }
.cert-next-btn { right: 0; }

.cert-prev-btn:hover,
.cert-next-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

html[data-theme="dark"] .cert-prev-btn:hover,
html[data-theme="dark"] .cert-next-btn:hover {
  background: rgba(191, 112, 138, 0.6);
  color: #fff;
  border-color: rgba(191, 112, 138, 0.6);
}

@media (max-width: 900px) {
  .cert-card {
    flex: 0 0 calc((100% - 40px) / 3); 
  }
}

@media (max-width: 600px) {
  .cert-carousel-container {
    padding: 0 40px;
  }
  .cert-card {
    flex: 0 0 calc((100% - 20px) / 2); 
  }
  .cert-img-wrapper {
    width: 100px; 
    height: 100px;
  }
}

@media (max-width: 400px) {
  .cert-card {
    flex: 0 0 100%; 
  }
}

.project-carousel-container {
  position: relative;
  margin-top: 30px;
  padding: 0 60px;
}

.project-carousel-track-container {
  overflow: hidden;
  margin: 0 -10px; 
  padding: 10px; 
}

.project-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-card {
  flex: 0 0 calc((100% - 40px) / 3); 
  position: relative;
  margin-right: 20px;
  display: flex;
  flex-direction: column;
}

.project-card .card {
  flex: 1;
  height: 100%;
  width: 100%;
}

.project-prev-btn,
.project-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.project-prev-btn { left: 0; }
.project-next-btn { right: 0; }

.project-prev-btn:hover,
.project-next-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

html[data-theme="dark"] .project-prev-btn:hover,
html[data-theme="dark"] .project-next-btn:hover {
  background: rgba(191, 112, 138, 0.6);
  color: #fff;
  border-color: rgba(191, 112, 138, 0.6);
}

@media (max-width: 900px) {
  .project-card {
    flex: 0 0 calc((100% - 20px) / 2); 
  }
}

@media (max-width: 600px) {
  .project-carousel-container {
    padding: 0 40px;
  }
  .project-card {
    flex: 0 0 100%; 
    margin-right: 20px; 
  }
}

.modal-content-image {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.modal.is-open .modal-content-image {
  opacity: 1;
  transform: scale(1);
}

.modal-content-image img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  border: 2px solid var(--border);
  background: var(--card-bg);
}

.modal-close-image {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0; 
  min-width: 32px; 
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1; 
  transition: all 0.2s ease;
  z-index: 10001;
}

.modal-close-image:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}
