﻿:root {
  --teal: #015870;
  --teal-dark: #013e50;
  --teal-accent: #0b7c9a;
  --accent-warm: #b3473b;
  --accent-blue: #1d5fa2;
  --bg: #fef3e0;
  --text: #0f172a;
  --border: #e7dcc8;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(1, 62, 80, 0.12);
  --shadow-soft: 0 8px 20px rgba(1, 62, 80, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(1, 88, 112, 0.08), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(11, 124, 154, 0.12), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(179, 71, 59, 0.1), transparent 55%);
  z-index: -1;
}

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

p,
li {
  font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1rem);
}

h3 {
  font-size: clamp(1rem, 0.9rem + 0.8vw, 1.35rem);
}

h4 {
  font-size: clamp(0.9rem, 0.85rem + 0.4vw, 1.1rem);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  padding: 8px 12px;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 999;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.section {
  padding: clamp(3rem, 6vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(
    --section-gradient,
    linear-gradient(180deg, rgba(1, 88, 112, 0.06) 0%, rgba(254, 243, 224, 0) 70%)
  );
  z-index: -1;
}

.section:not(.hero) .container {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(1, 88, 112, 0.12);
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(6px);
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(1.3rem, 1.1rem + 1.5vw, 2rem);
  margin: 0.2rem 0 0;
  color: var(--teal-dark);
  position: relative;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 84px;
  height: 4px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-accent));
  box-shadow: 0 6px 16px rgba(1, 88, 112, 0.2);
}

.eyebrow {
  text-shadow: 0 4px 12px rgba(1, 88, 112, 0.2);
}

.hero {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(179, 71, 59, 0.28) 40%,
    rgba(254, 243, 224, 0.95) 85%
  );
}

.about {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(1, 88, 112, 0.08) 45%,
    rgba(254, 243, 224, 0.95) 90%
  );
}

.formation {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(29, 95, 162, 0.2) 45%,
    rgba(254, 243, 224, 0.95) 90%
  );
}

.skills {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(1, 62, 80, 0.08) 45%,
    rgba(254, 243, 224, 0.95) 90%
  );
}

.projects {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(1, 62, 80, 0.22) 48%,
    rgba(254, 243, 224, 0.95) 92%
  );
}

.experiences {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(1, 88, 112, 0.1) 45%,
    rgba(254, 243, 224, 0.95) 90%
  );
}

.contact {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 0.95) 0%,
    rgba(179, 71, 59, 0.16) 45%,
    rgba(254, 243, 224, 0.95) 90%
  );
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(0.6rem, 0.55rem + 0.3vw, 0.75rem);
  color: var(--teal-accent);
  font-weight: 600;
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(254, 243, 224, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-back {
  display: flex;
  align-items: center;
}

.nav-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}

.nav-back-btn:hover {
  transform: translateY(-1px);
}

.nav-link {
  font-weight: 500;
  color: #1f2937;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: clamp(0.85rem, 0.8rem + 0.4vw, 1rem);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-dark);
  background: rgba(1, 88, 112, 0.12);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.nav-bar {
  width: 20px;
  height: 2px;
  background: var(--teal-dark);
  display: block;
  margin: 0 auto;
  transition: var(--transition);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 900;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open .nav-toggle .nav-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle .nav-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle .nav-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-media {
  display: none;
}

.hero-content {
  max-width: 70ch;
  justify-self: start;
}

.hero-content h1 {
  font-size: clamp(1.6rem, 1.2rem + 2.5vw, 2.8rem);
  margin: 0.4rem 0;
  color: var(--teal-dark);
}

.subtitle {
  font-size: clamp(0.85rem, 0.75rem + 0.6vw, 1.05rem);
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1rem);
  margin-bottom: 1.5rem;
}

.about-text {
  max-width: 68ch;
}

.about-text p + p {
  margin-top: 1rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: clamp(0.8rem, 0.75rem + 0.4vw, 0.95rem);
  cursor: pointer;
  transition: var(--transition);
}

.btn.primary {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn.primary:hover::after {
  transform: translateX(120%);
}

.btn.outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-dark);
}

.btn.outline:hover {
  background: rgba(1, 88, 112, 0.1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.2;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.chip {
  position: relative;
  overflow: hidden;
}

.chip:hover::after {
  opacity: 1;
}

.objective-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
}

.objective-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--teal-dark);
}

.media-frame {
  border-radius: 999px;
  border: none;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
}

.hero-media .media-frame {
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  margin: 0 auto;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #f2d9d6;
  transition: transform var(--transition), filter var(--transition), box-shadow var(--transition);
  box-shadow: 0 22px 50px rgba(179, 71, 59, 0.25);
}

.media-frame::after {
  content: none;
}

.media-plain {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 240px;
}

.media-plain img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  filter: saturate(1.05) contrast(1.05);
  transition: transform var(--transition), filter var(--transition);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

body:not(.theme-brutal) .card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(1, 88, 112, 0.2), rgba(11, 124, 154, 0.05))
    border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

body:not(.theme-brutal) .card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-top: 0;
  color: var(--teal-dark);
  font-size: clamp(0.95rem, 0.85rem + 0.7vw, 1.25rem);
}

.formation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
}

.tagline {
  font-weight: 600;
  color: var(--teal-accent);
}

.list-block h4 {
  margin-bottom: 0.5rem;
  color: var(--teal-dark);
}

.list-block ul {
  padding-left: 1.2rem;
  margin: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.skill-item {
  margin-bottom: 1.2rem;
}

.skill-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.skill-level {
  color: var(--teal-accent);
  font-size: 0.9rem;
  margin-left: auto;
  white-space: nowrap;
}

.skill-bar {
  height: 6px;
  background: rgba(1, 88, 112, 0.15);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.skill-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--level, 60%);
  background: linear-gradient(90deg, var(--teal), var(--teal-accent));
  border-radius: inherit;
}

.inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.inline-list li {
  padding-left: 1.2rem;
  position: relative;
}

.inline-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--teal-accent);
}

.language-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.language-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.projects .project-card {
  --project-accent: var(--teal);
  --project-accent-soft: rgba(1, 88, 112, 0.12);
  --project-accent-text: var(--teal-dark);
  --project-card-bg: var(--card);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 2rem;
  background: var(--project-card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(1, 88, 112, 0.12);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

body:not(.theme-brutal) .project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 10%, rgba(11, 124, 154, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

body:not(.theme-brutal) .project-card:hover::after {
  opacity: 1;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(1, 88, 112, 0.08), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.project-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(1, 88, 112, 0.08);
}

.project-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--border);
  transition: transform var(--transition), filter var(--transition);
}

.project-content h3 {
  margin-top: 0;
  color: var(--teal-dark);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--project-accent-soft, rgba(1, 88, 112, 0.12));
  color: var(--project-accent-text, var(--teal-dark));
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-summary {
  margin: 1rem 0 1.5rem;
  max-width: 62ch;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-details {
  width: 100%;
}

.project-details summary {
  list-style: none;
}

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

.details-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.project-details[open] .details-content {
  animation: fadeSlideIn 0.4s ease;
}

.project-card--upcoming {
  background: rgba(255, 255, 255, 0.6);
  border-style: dashed;
  --project-accent: var(--teal-dark);
  --project-accent-soft: rgba(1, 62, 80, 0.1);
  --project-accent-text: var(--teal-dark);
}

.project-card--sql {
  --project-accent: var(--accent-blue);
  --project-accent-soft: rgba(29, 95, 162, 0.18);
  --project-accent-text: #0b2645;
  --project-card-bg: linear-gradient(145deg, rgba(29, 95, 162, 0.12), rgba(255, 255, 255, 0.95));
  border-color: rgba(29, 95, 162, 0.25);
}

.project-card--sql::before {
  background: radial-gradient(circle at top right, rgba(29, 95, 162, 0.18), transparent 60%);
}

.project-card--sql .project-media img {
  filter: saturate(1.1) contrast(1.05);
  object-position: center top;
  transform: scale(1.08);
}

.project-card--upcoming .project-media img {
  object-position: center;
  transform: scale(1.08);
}

.project-card--sql:hover .project-media img,
.project-card--upcoming:hover .project-media img {
  transform: scale(1.12);
}

.upcoming-list {
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.upcoming-list li::marker {
  color: var(--teal-accent);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.timeline {
  border-left: 2px solid var(--border);
  margin-top: 1rem;
  padding-left: 1rem;
  display: grid;
  gap: 1rem;
}

.timeline-item h4 {
  margin: 0 0 0.4rem;
  color: var(--teal-dark);
  font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1.05rem);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.impact-card {
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact-form {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

input,
textarea {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
}

.form-help {
  color: #64748b;
}

.form-error {
  min-height: 1.2rem;
  color: #b42318;
  font-weight: 600;
  margin-bottom: 1rem;
}

.success-message {
  color: #117a37;
  font-weight: 700;
  background: rgba(17, 122, 55, 0.12);
  border: 1px solid rgba(17, 122, 55, 0.25);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.copy-status {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--teal-accent);
  min-height: 1rem;
}

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

  .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px rgba(1, 62, 80, 0.2);
  }

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

  .media-plain:hover img,
  .hero-media .media-frame:hover img {
    transform: scale(1.05);
    filter: saturate(1.05);
  }

  .chip:hover {
    transform: translateY(-3px);
  }

  .tag:hover,
  .skill-badge:hover {
    transform: translateY(-2px);
  }

  .btn:hover {
    transform: translateY(-2px);
  }
}

.contact-cards {
  display: grid;
  gap: 1.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, rgba(254, 243, 224, 0.4), rgba(255, 255, 255, 0.85) 40%);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--teal);
}

.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: var(--card);
  transition: var(--transition);
}

.social-links a:hover {
  background: rgba(1, 88, 112, 0.1);
}

.social-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer-bottom {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #475569;
}

.footer-note {
  font-size: 0.85rem;
  color: #64748b;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--teal);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-step {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
}

.back-step.is-visible {
  opacity: 1;
  pointer-events: auto;
}


.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

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

.hero-media {
  animation: floatSoft 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-media {
    animation: none;
  }
}

/* Disable heavy animations on mobile for better performance */
@media (max-width: 720px) {
  .hero-media {
    animation: none;
  }
}

@keyframes parallaxDrift {
  0% {
    transform: translateY(-6px);
  }
  50% {
    transform: translateY(6px);
  }
  100% {
    transform: translateY(-6px);
  }
}

.section::before {
  animation: none;
}

.section:nth-of-type(odd)::before {
  animation: none;
}

/* ================================
   THEME SYSTEM (switch on <body>)
   ================================ */

body.theme-glass {
  color: #e6edf5;
  background: #0b1118;
  --teal: #4aa3ff;
  --teal-dark: #8ec5ff;
  --teal-accent: #7cd6ff;
  --border: rgba(255, 255, 255, 0.12);
  --card: rgba(18, 26, 38, 0.7);
  --shadow: 0 24px 60px rgba(4, 10, 18, 0.6);
  --shadow-soft: 0 14px 40px rgba(4, 10, 18, 0.45);
}

body.theme-glass .site-header {
  background: rgba(11, 17, 24, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-glass .section:not(.hero) .container {
  background: rgba(18, 26, 38, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(8, 12, 20, 0.6);
}

body.theme-glass .card,
body.theme-glass .contact-form,
body.theme-glass .project-card {
  background: rgba(18, 26, 38, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(4, 10, 18, 0.5);
  backdrop-filter: blur(16px);
}

body.theme-glass .btn.primary {
  background: linear-gradient(120deg, #0b7c9a, #1d5fa2);
  box-shadow: 0 12px 30px rgba(29, 95, 162, 0.4);
}

body.theme-glass .btn.outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #e6edf5;
}

body.theme-glass .nav-link,
body.theme-glass .brand-mark {
  color: #e6edf5;
}

body.theme-glass .nav-link:hover,
body.theme-glass .nav-link.active {
  background: rgba(74, 163, 255, 0.2);
  color: #f5f7fb;
}

body.theme-glass .nav-back-btn {
  background: rgba(18, 26, 38, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f5f7fb;
}

body.theme-glass .section-heading h2,
body.theme-glass .hero-content h1,
body.theme-glass .card h3,
body.theme-glass .project-content h3 {
  color: #f5f7fb;
}

body.theme-glass .subtitle,
body.theme-glass .lead,
body.theme-glass .footer-note,
body.theme-glass .footer-bottom,
body.theme-glass .footer-about p,
body.theme-glass .footer-links a,
body.theme-glass .form-help {
  color: rgba(226, 232, 240, 0.8);
}

body.theme-glass .eyebrow {
  color: rgba(148, 163, 184, 0.9);
}

body.theme-glass .site-footer {
  background: linear-gradient(180deg, rgba(11, 17, 24, 0.9), rgba(15, 23, 42, 0.98));
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.theme-glass .hero {
  --section-gradient: linear-gradient(
    180deg,
    rgba(11, 17, 24, 0.95) 0%,
    rgba(179, 71, 59, 0.35) 40%,
    rgba(11, 17, 24, 0.95) 90%
  );
}

body.theme-glass .formation {
  --section-gradient: linear-gradient(
    180deg,
    rgba(11, 17, 24, 0.95) 0%,
    rgba(29, 95, 162, 0.4) 45%,
    rgba(11, 17, 24, 0.95) 90%
  );
}

body.theme-glass .projects {
  --section-gradient: linear-gradient(
    180deg,
    rgba(11, 17, 24, 0.95) 0%,
    rgba(1, 62, 80, 0.5) 50%,
    rgba(11, 17, 24, 0.95) 90%
  );
}

body.theme-glass .chip,
body.theme-glass .tag,
body.theme-glass .skill-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e6edf5;
}

body.theme-glass .media-frame {
  box-shadow: 0 30px 60px rgba(179, 71, 59, 0.3);
}

body.theme-glass .project-card--sql {
  --project-card-bg: rgba(18, 26, 38, 0.7);
}

body.theme-brutal {
  color: #111827;
  background: #f8f4ec;
  --teal: #ffb703;
  --teal-dark: #111827;
  --teal-accent: #ff7a00;
  --border: #111827;
  --card: #ffffff;
  --shadow: 12px 12px 0 #111827;
  --shadow-soft: 8px 8px 0 #111827;
}

body.theme-brutal .site-header {
  background: #f8f4ec;
  border-bottom: 3px solid #111827;
}

body.theme-brutal .section:not(.hero) .container {
  background: #ffffff;
  border: 3px solid #111827;
  border-radius: 10px;
  box-shadow: 12px 12px 0 #111827;
}

body.theme-brutal .card,
body.theme-brutal .contact-form,
body.theme-brutal .project-card {
  background: #ffffff;
  border: 3px solid #111827;
  border-radius: 10px;
  box-shadow: 12px 12px 0 #111827;
}

body.theme-brutal .btn {
  border: 3px solid #111827;
  border-radius: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.theme-brutal .btn.primary {
  background: #ffb703;
  color: #111827;
}

body.theme-brutal .btn.outline {
  background: #ffffff;
}

body.theme-brutal .project-card {
  grid-template-columns: 1fr 1fr;
  padding: 1.2rem;
}

body.theme-brutal .project-media {
  box-shadow: 4px 4px 0 #111827;
  border-radius: 10px;
  border: 2px solid #111827;
  background: #ffffff;
}

body.theme-brutal .project-media img {
  border-radius: 10px;
}

body.theme-brutal .hero-content h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  text-transform: uppercase;
}

body.theme-brutal .hero-media img {
  border: 3px solid #111827;
  box-shadow: 6px 6px 0 #111827;
}

body.theme-brutal .chip,
body.theme-brutal .tag,
body.theme-brutal .skill-badge {
  border: 2px solid #111827;
  background: #fef3e0;
  font-weight: 700;
}

body.theme-brutal .objective-card,
body.theme-brutal .impact-card {
  box-shadow: 8px 8px 0 #111827;
  border: 3px solid #111827;
}

body.theme-brutal .nav-link {
  font-weight: 800;
}

body.theme-brutal .nav-link:hover,
body.theme-brutal .nav-link.active {
  background: #ffb703;
  color: #111827;
}

body.theme-brutal .nav-back-btn {
  border: 2px solid #111827;
  box-shadow: 4px 4px 0 #111827;
}

body.theme-brutal .hero {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 1) 0%,
    rgba(255, 183, 3, 0.35) 50%,
    rgba(254, 243, 224, 1) 90%
  );
}

body.theme-brutal .projects {
  --section-gradient: linear-gradient(
    180deg,
    rgba(254, 243, 224, 1) 0%,
    rgba(29, 95, 162, 0.25) 50%,
    rgba(254, 243, 224, 1) 90%
  );
}

body.theme-minimal {
  color: #0f172a;
  background: #ffffff;
  --teal: #2563eb;
  --teal-dark: #1e40af;
  --teal-accent: #60a5fa;
  --border: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.06);
}

body.theme-minimal .site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e5e7eb;
}

body.theme-minimal .section:not(.hero) .container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

body.theme-minimal .card,
body.theme-minimal .contact-form,
body.theme-minimal .project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

body.theme-minimal .btn.primary {
  background: #2563eb;
  color: #ffffff;
}

body.theme-minimal .nav-link:hover,
body.theme-minimal .nav-link.active {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
}

body.theme-minimal .nav-back-btn {
  border-color: #2563eb;
  color: #2563eb;
}

body.theme-minimal .btn.outline {
  border-color: #2563eb;
  color: #2563eb;
}

body.theme-minimal .chip,
body.theme-minimal .tag,
body.theme-minimal .skill-badge {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

body.theme-minimal .hero {
  --section-gradient: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(37, 99, 235, 0.08) 45%,
    rgba(255, 255, 255, 1) 90%
  );
}

body.theme-minimal .formation {
  --section-gradient: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(37, 99, 235, 0.06) 45%,
    rgba(255, 255, 255, 1) 90%
  );
}

body.theme-minimal .projects {
  --section-gradient: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(37, 99, 235, 0.12) 50%,
    rgba(255, 255, 255, 1) 92%
  );
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.noscript {
  padding: 1rem;
  background: var(--teal-dark);
  color: #fff;
  text-align: center;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--card);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.4rem;
    box-shadow: var(--shadow);
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 950;
    align-items: center;
  }

  body.nav-open .nav-list {
    transform: translateX(0);
  }

  .nav-back {
    align-self: flex-start;
    margin-bottom: 1rem;
  }

  .hero-grid,
  .about-grid,
  .formation-grid,
  .projects .project-card {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .hero-content {
    order: 1;
  }

  .projects .project-card {
    padding: 1.5rem;
  }

  .hero-media .media-frame {
    width: min(320px, 90vw);
    height: min(320px, 90vw);
  }

  .formation-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 3rem 0;
  }

  .section:not(.hero) .container {
    padding: 1.4rem;
    border-radius: 22px;
  }

  .header-content {
    padding: 0.75rem 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .brand-mark img {
    width: 40px;
    height: 40px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .hero-grid {
    gap: 1.2rem;
  }

  .hero-content {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(1, 88, 112, 0.16);
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  }

  .chip-group {
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .chip {
    white-space: nowrap;
  }

  .cta-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-group .btn {
    width: 100%;
  }

  .project-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-tags {
    gap: 0.4rem;
  }

  .nav-list {
    width: 100%;
  }

  .skill-level {
    font-size: 0.85rem;
  }

  .project-media {
    aspect-ratio: 16 / 10;
  }

  .hero-media .media-frame {
    width: min(260px, 80vw);
    height: min(260px, 80vw);
  }

  body.theme-brutal .section:not(.hero) .container {
    box-shadow: none;
    border-width: 2px;
    padding: 1rem;
  }

  body.theme-brutal .card,
  body.theme-brutal .project-card,
  body.theme-brutal .contact-form,
  body.theme-brutal .objective-card,
  body.theme-brutal .impact-card {
    box-shadow: none;
    border-width: 2px;
  }

  body.theme-brutal .project-media {
    box-shadow: none;
    border-width: 2px;
  }

  .projects .project-card,
  .card,
  .contact-form,
  .impact-card {
    overflow: hidden;
  }

  .back-to-top,
  .back-step {
    bottom: 0.75rem;
  }

  .back-step {
    left: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .back-to-top {
    right: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* Performance: reduce backdrop-filter blur on mobile */
  .section:not(.hero) .container {
    backdrop-filter: blur(3px);
  }

  .site-header {
    backdrop-filter: blur(4px);
  }
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .section::before {
    animation: none;
    transform: none;
  }
}

html {
  scroll-behavior: smooth;
}

.contact-form input[name='bot-field'] {
  display: none;
}


.skill-badge {
  background: rgba(1, 88, 112, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Mobile small screens (iPhone ~390px, Android ~360px) */
@media (max-width: 420px) {
  .container {
    width: min(1120px, 94vw);
  }

  .section:not(.hero) .container {
    padding: 1rem;
    border-radius: 18px;
  }

  .hero-content {
    padding: 1rem;
    border-radius: 18px;
  }

  .hero-content h1 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    line-height: 1.2;
  }

  .hero-media .media-frame {
    width: min(220px, 70vw);
    height: min(220px, 70vw);
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .eyebrow {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }

  .section-heading h2 {
    font-size: 1.2rem;
  }

  .section-heading h2::after {
    width: 60px;
    height: 3px;
  }

  .card {
    padding: 1rem;
  }

  .card h3 {
    font-size: 0.95rem;
  }

  p, li {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
  }

  .chip {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }

  .chip-group {
    gap: 0.4rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .objective-card {
    padding: 1rem;
  }

  .objective-card h2 {
    font-size: 0.95rem;
  }

  .objective-card p {
    font-size: 0.85rem;
  }

  .skill-badge {
    font-size: 0.8rem;
  }

  .skill-level {
    font-size: 0.75rem;
  }

  .skill-item p {
    font-size: 0.8rem;
  }

  .form-field label {
    font-size: 0.85rem;
  }

  input,
  textarea {
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
  }

  .form-help {
    font-size: 0.75rem;
  }

  .contact-form {
    padding: 1.2rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .footer-about h3,
  .footer-links h3,
  .footer-social h3 {
    font-size: 1rem;
  }

  .timeline-item h4 {
    font-size: 0.85rem;
  }

  .timeline-item p {
    font-size: 0.8rem;
  }

  .impact-card {
    padding: 1rem;
  }

  .impact-card h3 {
    font-size: 0.9rem;
  }

  .impact-card p {
    font-size: 0.8rem;
  }

  .project-card {
    padding: 1rem;
    gap: 1rem;
  }

  .project-content h3 {
    font-size: 1rem;
  }

  .project-summary {
    font-size: 0.85rem;
    margin: 0.75rem 0 1rem;
  }

  .details-content {
    font-size: 0.85rem;
  }

  .details-content h4 {
    font-size: 0.9rem;
  }

  .language-list {
    font-size: 0.85rem;
  }

  .list-block ul {
    font-size: 0.85rem;
  }

  .list-block h4 {
    font-size: 0.9rem;
  }

  .upcoming-list {
    font-size: 0.85rem;
  }

  body.theme-brutal .hero-content h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  body.theme-brutal .section:not(.hero) .container {
    padding: 0.8rem;
  }

  body.theme-brutal .card,
  body.theme-brutal .project-card,
  body.theme-brutal .contact-form {
    padding: 0.8rem;
  }
}

