@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Newsreader:wght@400;600&display=swap");

:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --ink: #1d1b16;
  --muted: #6b635a;
  --card: #fffaf3;
  --accent: #f4b840;
  --accent-strong: #d8941f;
  --border: #eadfcd;
  --shadow: 0 14px 36px rgba(24, 18, 8, 0.12);
  --radius: 18px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --ink: #e6edf3;
  --muted: #8b949e;
  --card: #161b22;
  --accent: #79c0ff;
  --accent-strong: #58a6ff;
  --border: #30363d;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

body {
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(#e4d9c6 1px, transparent 1px),
    radial-gradient(#efe5d6 1px, transparent 1px),
    linear-gradient(120deg, #f8efe2 0%, #f5f1e7 55%, #efe4d3 100%);
  background-size: 22px 22px, 110px 110px, cover;
  background-position: 0 0, 10px 12px, 0 0;
  color: var(--ink);
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background-image: radial-gradient(#1f2937 1px, transparent 1px),
    radial-gradient(#111827 1px, transparent 1px),
    linear-gradient(140deg, #0d1117 0%, #111827 55%, #1f2937 100%);
}

.page {
  max-width: 800px;
  margin: 32px auto 96px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-footer {
  width: 100%;
  margin: 16px 0 0;
  padding: 20px 24px 28px;
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  border-radius: 0;
  box-shadow: 0 -8px 24px rgba(24, 18, 8, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.page-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 184, 64, 0.6), transparent);
}

.page-footer p {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: center;
}

[data-theme="dark"] .page-footer {
  background: rgba(22, 27, 34, 0.9);
}

.top-nav {
  align-self: center;
  background: rgba(255, 250, 243, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 16px 30px rgba(24, 18, 8, 0.12);
  position: sticky;
  top: 18px;
  z-index: 2;
  backdrop-filter: blur(10px);
  animation: rise 0.8s ease both;
  flex-wrap: nowrap;
  width: fit-content;
}

[data-theme="dark"] .top-nav {
  background: rgba(28, 24, 18, 0.9);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-link {
  padding: 6px 11px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(244, 184, 64, 0.18);
}

.nav-link.selected {
  background: var(--accent);
  color: #221a0a;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 8px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  line-height: 0;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(24, 18, 8, 0.15);
}

[data-theme="dark"] .theme-toggle {
  background: var(--card);
  border-color: var(--border);
  color: var(--ink);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon svg {
  fill: currentColor;
  stroke: none;
}

.icon-sun {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.icon-sun svg,
.icon-moon svg {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: inline-flex;
}

.icon-moon {
  display: none;
}

/* ─── Language toggle ──────────────────────────────────────────────────────── */
.lang-toggle {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 36px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(24, 18, 8, 0.15);
}

[data-theme="dark"] .lang-toggle {
  background: var(--card);
  border-color: var(--border);
  color: var(--muted);
}

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px 28px 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease both;
}

.hero-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hero-title-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hero-avatar {
  width: 110px;
  height: 110px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(244, 184, 64, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  row-gap: 8px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  background: rgba(244, 184, 64, 0.18);
  color: var(--accent-strong);
  border: 1px solid rgba(244, 184, 64, 0.4);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: normal;
  max-width: min(100%, 30ch);
  text-wrap: balance;
}

.meta-sep {
  color: var(--accent-strong);
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-location svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-location circle {
  fill: currentColor;
  stroke: none;
}

h1 {
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-summary {
  font-size: 0.95rem;
  max-width: 64ch;
  color: var(--ink);
  text-align: justify;
  line-height: 1.5;
}

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

.hero-links a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(24, 18, 8, 0.12);
  border-color: rgba(244, 184, 64, 0.5);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.contact-list li {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-list li:nth-child(2n) {
  border-right: none;
}

.contact-list li:nth-last-child(-n+2) {
  border-bottom: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  transition:
    background 0.25s ease,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.contact-item:hover {
  background: rgba(244, 184, 64, 0.10);
  transform: translateX(6px);
  box-shadow: -3px 0 0 0 var(--accent-strong);
}

.contact-item:active {
  transform: translateX(3px) scale(0.98);
  transition-duration: 0.08s;
}

/* Icon reacts on parent hover */
.contact-item .contact-icon {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.25s ease,
    color 0.25s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.18) rotate(-4deg);
  background: rgba(244, 184, 64, 0.28);
  color: var(--accent-strong);
}

/* Value text subtle slide */
.contact-item .contact-value {
  transition: color 0.25s ease;
}

.contact-item:hover .contact-value {
  color: var(--accent-strong);
}

/* Anti-scraper: text stored reversed, CSS flips it visually */
.reverse {
  display: inline-block;
  direction: rtl;
  unicode-bidi: bidi-override;
  display: inline-block;
}

.contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 184, 64, 0.15);
  color: var(--accent-strong);
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-value {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  word-break: break-all;
  overflow-wrap: break-word;
  line-height: 1.3;
}



.info-container {
  display: grid;
  gap: 14px;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(24, 18, 8, 0.08);
  animation: rise 0.8s ease both;
}

.card:has(.contact-list) {
  padding: 0;
  overflow: hidden;
}

.card:nth-of-type(1) {
  animation-delay: 0.1s;
}

.card:nth-of-type(2) {
  animation-delay: 0.16s;
}

.card:nth-of-type(3) {
  animation-delay: 0.22s;
}

.card:nth-of-type(4) {
  animation-delay: 0.28s;
}

.card-body {
  color: var(--ink);
}

.doable li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(109, 98, 84, 0.2);
}

.doable li:last-child {
  border-bottom: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.skill-group {
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skill-group:nth-child(even) {
  border-right: none;
}

.skill-group:nth-last-child(-n+2) {
  border-bottom: none;
}

.skill-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
}

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

.skill-tags li {
  padding: 5px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.88rem;
}

/* Experience */

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(24, 18, 8, 0.08);
}

.exp-item {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-item[open] {
  border-left: 3px solid var(--accent);
}

.exp-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.18s ease;
}

.exp-summary::-webkit-details-marker {
  display: none;
}

.exp-summary:hover {
  background: rgba(244, 184, 64, 0.06);
}

.exp-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exp-role {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.exp-company {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.exp-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exp-date::after {
  content: "›";
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.exp-item[open] > .exp-summary .exp-date::after {
  transform: rotate(90deg);
}

.exp-body {
  padding: 0 20px 18px 20px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.exp-body ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 16px;
  list-style: disc;
}

.exp-body li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

#projects + .card {
  border-left: 4px solid var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════════ */

/* Projects page header */
.projects-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease both;
}

.projects-hero::after {
  content: "";
  position: absolute;
  top: -130px;
  right: -110px;
  width: 310px;
  height: 310px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.28), transparent 70%);
  pointer-events: none;
}

.projects-hero::before {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.15), transparent 70%);
  pointer-events: none;
}

.projects-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.2rem, 2.8vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.projects-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.projects-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Filter pills */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filter-pill:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #221a0a;
}

[data-theme="dark"] .filter-pill.active {
  color: #0d1117;
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Project card */
.proj-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 8px 22px rgba(24, 18, 8, 0.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.7s ease both;
  height: 100%;
}

.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(24, 18, 8, 0.13);
}

.proj-card-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.proj-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

/* Type badges */
.proj-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.proj-type-desktop {
  background: rgba(88, 166, 255, 0.15);
  color: #58a6ff;
}

.proj-type-mobile {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.proj-type-backend {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

.proj-type-frontend{
  background: rgba(188, 130, 255, 0.15);
  color: #bc82ff;
}

[data-theme="dark"] .proj-type-desktop { color: #79c0ff; }
[data-theme="dark"] .proj-type-mobile  { color: #56d364; }
[data-theme="dark"] .proj-type-backend { color: #e3b341; }
[data-theme="dark"] .proj-type-frontend{ color: #bc8cff; }

.proj-status-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-status-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.proj-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proj-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.proj-status-production {
  background: rgba(63, 185, 80, 0.16);
  color: #2f9e44;
  border-color: rgba(63, 185, 80, 0.35);
}

.proj-status-development {
  background: rgba(210, 153, 34, 0.16);
  color: #b7791f;
  border-color: rgba(210, 153, 34, 0.4);
}

.proj-status-completed {
  background: rgba(88, 166, 255, 0.16);
  color: #2b6cb0;
  border-color: rgba(88, 166, 255, 0.35);
}

[data-theme="dark"] .proj-status-production {
  color: #56d364;
}

[data-theme="dark"] .proj-status-development {
  color: #e3b341;
}

[data-theme="dark"] .proj-status-completed {
  color: #79c0ff;
}

/* Summary */
.proj-summary {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

/* Tech tags (reuse pill style) */
.proj-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.proj-tech-list li {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(244, 184, 64, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(244, 184, 64, 0.25);
  border-radius: 6px;
  padding: 3px 9px;
}

[data-theme="dark"] .proj-tech-list li {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent-strong);
  border-color: rgba(88, 166, 255, 0.2);
}

/* Footer: actions */
.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Actions area */
.proj-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(244, 184, 64, 0.35);
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.proj-link:hover {
  background: rgba(244, 184, 64, 0.15);
  border-color: var(--accent);
}

.proj-link-github svg,
.proj-link-demo svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Private repo badge */
.proj-private {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.proj-private svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Screenshots */
.proj-screenshots {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 9;
  margin: -2px -2px 0;
  border-bottom: 1px solid var(--border);
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
}

.proj-screenshots-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.proj-screenshots-track.dragging {
  transition: none;
}

.proj-screenshot {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.proj-screenshots-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.proj-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.proj-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* GitHub link in dark mode */
[data-theme="dark"] .proj-link {
  border-color: rgba(88, 166, 255, 0.3);
}

[data-theme="dark"] .proj-link:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent-strong);
}

/* Loading skeleton */
.proj-loading {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  padding: 12px 0;
}

.proj-loading span {
  flex: 1;
  height: 160px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--border) 25%, var(--card) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.proj-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

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

@media (max-width: 720px) {
  .page {
    margin: 20px auto 64px;
  }

  .hero {
    padding: 24px;
  }

  .top-nav {
    align-self: center;
    width: fit-content;
    flex-wrap: nowrap;
    padding: 8px 10px;
    gap: 2px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    padding: 5px 7px;
    font-size: 0.72rem;
  }

  .hero-heading {
    justify-content: space-between;
    gap: 16px;
  }

  .hero-meta {
    gap: 8px;
    row-gap: 6px;
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .pill {
    font-size: 0.78rem;
    padding: 5px 10px;
    max-width: calc(100% - 2px);
  }

  .meta-sep {
    display: none;
  }

  .location {
    width: 100%;
    font-size: 0.86rem;
  }

  .hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    transform: translateX(0);
  }

  .hero-links {
    justify-content: flex-start;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }

  .contact-list li {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .contact-list li:last-child {
    border-bottom: none;
  }

  .page-footer {
    margin: 16px 0 0;
    padding: 16px 0 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-footer p {
    padding: 0 20px;
    text-align: left;
  }
}

/* ── Image Modal ──────────────────────────────────────────────────────────── */
.img-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.img-modal.open {
  pointer-events: all;
  opacity: 1;
}

.img-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.img-modal-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(88vw, 1000px);
  max-height: 82vh;
  background: #0d0d0d;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.img-modal.open .img-modal-box {
  transform: scale(1);
}

.img-modal-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 82vh;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* Close button */
.img-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 30, 0.62);
  color: #c8c8c8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.img-modal-close:hover {
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  transform: scale(1.1);
}

.img-modal-close svg {
  width: 16px;
  height: 16px;
}

/* Prev / Next nav */
.img-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 30, 0.62);
  color: #c8c8c8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.img-modal-nav:hover {
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.img-modal-nav[hidden] {
  display: none;
}

.img-modal-nav svg {
  width: 20px;
  height: 20px;
}

.img-modal-prev { left: 14px; }
.img-modal-next { right: 14px; }

/* Counter */
.img-modal-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Certifications page
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero ─────────────────────────────────────────────────────────────────────── */
.certs-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease both;
}

.certs-hero::after {
  content: "";
  position: absolute;
  top: -130px;
  right: -110px;
  width: 310px;
  height: 310px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.28), transparent 70%);
  pointer-events: none;
}

.certs-title {
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(2.2rem, 2.8vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.certs-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Section ──────────────────────────────────────────────────────────────────── */
.certs-section {
  animation: rise 0.8s ease both;
}

/* Grid ─────────────────────────────────────────────────────────────────────── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Card ─────────────────────────────────────────────────────────────────────── */
.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(24, 18, 8, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.7s ease both;
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(24, 18, 8, 0.13);
}

/* Image area — identical proportions to .proj-screenshots ──────────────────── */
.cert-img-area {
  position: relative;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-snapshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}

.cert-card:hover .cert-snapshot {
  transform: scale(1.03);
}

/* Body ─────────────────────────────────────────────────────────────────────── */
.cert-body {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cert-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
}

.cert-issuer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* Verify button ────────────────────────────────────────────────────────────── */
.cert-verify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 2px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: color 0.18s ease, gap 0.18s ease;
}

.cert-verify-btn:not(.cert-verify-btn--disabled):hover {
  color: var(--ink);
  gap: 10px;
}

.cert-verify-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Disabled — no public verification URL */
.cert-verify-btn--disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

/* Dark mode ────────────────────────────────────────────────────────────────── */
[data-theme="dark"] .cert-verify-btn {
  color: var(--accent-strong);
}

[data-theme="dark"] .cert-verify-btn:not(.cert-verify-btn--disabled):hover {
  color: var(--ink);
}

/* Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .cert-grid { grid-template-columns: 1fr; }

  .certs-hero { padding: 28px 24px; }

  .cert-body { padding: 16px 18px 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Contact Page
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero ─────────────────────────────────────────────────────────────────────── */
.contact-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 40px 36px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  animation: rise 0.8s ease both;
}

.contact-hero::after {
  content: "";
  position: absolute;
  top: -130px;
  right: -110px;
  width: 310px;
  height: 310px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.28), transparent 70%);
  pointer-events: none;
}

.contact-hero::before {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(244, 184, 64, 0.15), transparent 70%);
  pointer-events: none;
}

.contact-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(244, 184, 64, 0.15);
  border: 1px solid rgba(244, 184, 64, 0.3);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.contact-hero-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent-strong);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-title {
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(2.2rem, 2.8vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.contact-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Form Card ────────────────────────────────────────────────────────────────── */
.contact-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: 0 10px 26px rgba(24, 18, 8, 0.08);
  position: relative;
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  animation: rise 0.8s 0.1s ease both;
}

.contact-form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong), var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Form layout ──────────────────────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Input wrappers ───────────────────────────────────────────────────────────── */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.input-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 184, 64, 0.15);
  background: var(--card);
}

.input-wrapper:focus-within .input-icon svg {
  stroke: var(--accent-strong);
}

/* Textarea ─────────────────────────────────────────────────────────────────── */
.textarea-wrapper textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.6;
  resize: vertical;
  min-height: 140px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.textarea-wrapper textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.textarea-wrapper textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 184, 64, 0.15);
  background: var(--card);
}

/* Validation states ────────────────────────────────────────────────────────── */
.form-group.invalid .input-wrapper input,
.form-group.invalid .textarea-wrapper textarea {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.form-group.invalid .input-icon svg {
  stroke: #e74c3c;
}

/* Submit button ────────────────────────────────────────────────────────────── */
.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1a1400;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  align-self: stretch;
}

.btn-send::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(244, 184, 64, 0.35);
}

.btn-send:hover::before {
  opacity: 1;
}

.btn-send:active {
  transform: translateY(0);
}

.btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-send-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-send.sending .btn-send-text::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #1a1400;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

.btn-send.sending .btn-send-icon {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status messages ──────────────────────────────────────────────────────────── */
.form-status {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 48px 24px;
  animation: rise 0.5s ease both;
}

.form-status:not([hidden]) {
  display: flex;
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-status--success .status-icon {
  background: rgba(46, 204, 113, 0.12);
}

.form-status--success .status-icon svg {
  width: 32px;
  height: 32px;
  stroke: #2ecc71;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-status--error .status-icon {
  background: rgba(231, 76, 60, 0.12);
}

.form-status--error .status-icon svg {
  width: 32px;
  height: 32px;
  stroke: #e74c3c;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-status h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.form-status p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  max-width: 36ch;
}

.btn-reset {
  padding: 10px 24px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-reset:hover {
  background: rgba(244, 184, 64, 0.12);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Dark mode specifics ──────────────────────────────────────────────────────── */
[data-theme="dark"] .input-wrapper input,
[data-theme="dark"] .textarea-wrapper textarea {
  background: rgba(13, 17, 23, 0.6);
  border-color: var(--border);
}

[data-theme="dark"] .input-wrapper input:focus,
[data-theme="dark"] .textarea-wrapper textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
  background: var(--card);
}

[data-theme="dark"] .btn-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0d1117;
}

[data-theme="dark"] .btn-send:hover {
  box-shadow: 0 12px 28px rgba(88, 166, 255, 0.25);
}

[data-theme="dark"] .form-group.invalid .input-wrapper input,
[data-theme="dark"] .form-group.invalid .textarea-wrapper textarea {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

/* Contact page responsive ──────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .contact-hero {
    padding: 28px 24px;
  }

  .contact-form-card {
    padding: 24px 20px;
  }
}

/* Fade suave entre páginas */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

::view-transition-new(root) {
  animation: fade-in 0.25s ease;
}