
:root {
  --bg: #f5f5f5;
  --text: #222;
  --accent: #000;
}

body {
  margin: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #111;
  color: white;
}

.hero h1 {
  font-size: 3em;
  margin: 0;
}

.hero .subtitle {
  margin-top: 10px;
  font-size: 1.2em;
  opacity: 0.8;
}

.nav a {
  margin: 15px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.nav a:hover {
  color: #aaa;
}

.section {
  padding: 80px 20px;
  max-width: 800px;
  margin: auto;
}

.project {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
}

footer {
  text-align: center;
  padding: 40px 20px;
  background: #111;
  color: white;
}

/* Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}


/* --- Added styles for portfolio enhancements --- */

.section h2 {
  font-size: 1.8em;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}

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

.btn.ghost {
  background: transparent;
  color: var(--accent);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  font-size: .95em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.contact-cta {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
  }
}


/* --- Readability improvements & icons --- */
html { scroll-behavior: smooth; }

.section p {
  line-height: 1.75;
  margin-bottom: 14px;
  max-width: 72ch;
}

.hero { position: relative; }

.scroll-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.85;
  animation: bounce 1.8s infinite;
  text-decoration: none;
}

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

.icon-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: #fff;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}

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

.icon-btn svg { display: block; }


/* Pills list for courses */
.pill-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.pill-list li {
  background: #fff;
  border: 1px solid #eaeaea;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.meta { font-size: 0.95em; opacity: 0.85; }


/* Improve hero buttons contrast on dark header */
.hero .btn {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.hero .btn.ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

/* About photo layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.about-photo {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  text-align: center;
}

.profile-pic {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto;
}

.about-photo figcaption {
  font-size: 0.85em;
  opacity: 0.7;
  margin-top: 8px;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.2fr .8fr;
  }
}


/* --- Global readability upgrades --- */
body { line-height: 1.6; }

/* Apply airy spacing to most text blocks, like in "À propos" */
.section p,
.section ul,
.section ol {
  line-height: 1.8;
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

.section li {
  margin-bottom: 10px;
}

/* Projects details */
.project ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Contact text and small meta text */
.contact-cta p,
.meta {
  line-height: 1.8;
}

/* Headings spacing */
.section h2 {
  margin-bottom: 20px;
}

/* Slightly more vertical space between sections */
.section {
  padding-top: 56px;
  padding-bottom: 56px;
}


/* --- Projects spacing tweaks --- */
#projects.section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.project {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.project + .project { margin-top: 16px; }

.project h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.project .meta { margin-top: 8px; }


/* --- Bento grid for courses --- */
#courses .bento {
  display: grid;
  gap: 14px;
  grid-auto-rows: 110px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-auto-flow: dense;
}

#courses .tile {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
}

#courses .tile small {
  display: block;
  font-weight: 500;
  opacity: .7;
  margin-top: 6px;
}

/* Varied spans for a bento look (desktop) */
@media (min-width: 900px) {
  #courses .tile.t1 { grid-column: span 2; grid-row: span 2; }
  #courses .tile.t2 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t3 { grid-column: span 1; grid-row: span 2; }
  #courses .tile.t4 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t5 { grid-column: span 2; grid-row: span 1; }
  #courses .tile.t6 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t7 { grid-column: span 1; grid-row: span 1; }
}

/* Subtle hover */
#courses .tile:hover {
  transform: translateY(-2px);
  transition: transform .15s ease;
}


/* --- Bento v2: varied tiles + icons + better text flow --- */
#courses .bento {
  display: grid;
  gap: 16px;
  grid-auto-rows: clamp(110px, 12vw, 160px);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-auto-flow: dense;
}

#courses .tile {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

#courses .tile-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

#courses .tile-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
}

#courses .tile-text { min-width: 0; }

#courses .tile-title {
  font-weight: 700;
  font-size: clamp(1rem, 1vw + .7rem, 1.15rem);
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
}

#courses .tile-sub {
  font-weight: 500;
  opacity: .75;
  margin-top: 4px;
  font-size: clamp(.85rem, .7vw + .6rem, .95rem);
  line-height: 1.2;
  word-break: break-word;
}

/* More variation on desktop */
@media (min-width: 900px) {
  #courses .tile.t1 { grid-column: span 2; grid-row: span 2; } /* Big DB */
  #courses .tile.t2 { grid-column: span 1; grid-row: span 2; } /* Tall Graphs */
  #courses .tile.t3 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t4 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t5 { grid-column: span 2; grid-row: span 1; } /* Wide Simulation */
  #courses .tile.t6 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t7 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t8 { grid-column: span 2; grid-row: span 1; } /* Wide Compilers */
  #courses .tile.t9 { grid-column: span 1; grid-row: span 1; }
  #courses .tile.t10{ grid-column: span 1; grid-row: span 1; }
}

/* Tighten text spacing inside tiles on narrow screens */
@media (max-width: 420px) {
  #courses .tile { padding: 12px; gap: 10px; }
  #courses .tile-icon { width: 32px; height: 32px; }
  #courses .tile-icon svg { width: 24px; height: 24px; }
}


/* === OVERRIDE: disable hover lift effects on tiles and project cards === */
#courses .tile,
.project {
  transition: none !important;
}

#courses .tile:hover,
.project:hover {
  transform: none !important;
}


/* === PROJECTS AIRINESS OVERRIDE === */
#projects.section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.project {
  padding: 24px 22px;
  margin-top: 22px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.project h3 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
}

.project ul {
  margin-top: 10px;
  margin-bottom: 12px;
  padding-left: 18px;
}

.project ul li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.project .meta {
  margin-top: 12px;
}


/* --- Vertical contact list (icon + text) --- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
}

.contact-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.contact-link:hover {
  text-decoration: underline;
}


/* Nudge spacing: a bit more room between icons and text */
.contact-list li { gap: 16px; }


/* Final tweak: a touch more spacing between icons and text */
.contact-list li { gap: 20px; }


/* Back-to-top arrow inside footer (non-fixed) */
footer .back-top-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 10px;
  border-radius: 999px;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
}

footer .back-top-inline:hover {
  background: #fff;
  color: #111;
}
