:root {
  --bg: #eef6f1;          /* blanc cassé teinté de vert */
  --bg-2: #f5fcf7;
  --card: #ffffff;
  --card-border: rgba(22, 163, 74, 0.12);
  --text: #0f2417;        /* vert très foncé pour le texte */
  --muted: #4f6357;
  --faint: #5a7266;
  --accent: #15803d;
  --accent-2: #16a34a;
  --accent-3: #0d9488;
  --grad: linear-gradient(115deg, #16a34a 0%, #15803d 55%, #166534 110%);
  --shadow: 0 6px 24px rgba(20, 83, 45, 0.08);
  --shadow-lg: 0 18px 50px rgba(20, 83, 45, 0.14);
  --radius: 18px;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }
em { font-style: normal; color: var(--accent); font-weight: 600; }

/* ===== Background : blanc lait + bleu, cercles + pois ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(circle at 18% 12%, #ffffff 0%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 85% 8%, #e3f5e9 0%, rgba(227,237,253,0) 40%),
    radial-gradient(circle at 50% 100%, #e8f7ee 0%, rgba(232,240,254,0) 55%),
    var(--bg);
}
/* pois bleus discrets */
.bg-grid::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(22,163,74,0.07) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 55%, transparent 100%);
}
/* cercles décoratifs */
.bg-glow { position: fixed; z-index: -2; border-radius: 50%; pointer-events: none; }
.glow-1 { width: 460px; height: 460px; top: -140px; right: -120px;
  background: radial-gradient(circle, rgba(22,163,74,0.18), rgba(22,163,74,0) 70%);
  filter: blur(10px); animation: float1 20s ease-in-out infinite; }
.glow-2 { width: 380px; height: 380px; bottom: 8%; left: -130px;
  background: radial-gradient(circle, rgba(13,148,136,0.16), rgba(13,148,136,0) 70%);
  filter: blur(10px); animation: float2 24s ease-in-out infinite; }
/* anneau (cercle outline) */
.glow-3 { width: 520px; height: 520px; top: 32%; right: -200px;
  border: 1.5px solid rgba(22,163,74,0.10);
  box-shadow: 0 0 0 60px rgba(22,163,74,0.03), inset 0 0 0 60px rgba(22,163,74,0.03);
  animation: float1 28s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,40px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-40px,30px)} }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6vw; transition: all .4s ease;
}
.nav.scrolled {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(20,83,45,0.06);
  padding: 14px 6vw;
}
.nav-brand { font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.3rem; letter-spacing: 1px; color: var(--text); }
.nav-brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; position: relative; transition: color .25s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width .3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: 100px; padding: 3px; box-shadow: var(--shadow); }
.lang-switch button { font-family: 'JetBrains Mono'; font-size: 0.72rem; font-weight: 600; color: var(--muted); padding: 6px 12px; min-height: 32px; background: none; border: 0; border-radius: 100px; cursor: pointer; transition: all .25s; }
.lang-switch button.active { background: var(--grad); color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 26px; height: 2px; background: var(--text); transition: .3s; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 100px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all .3s ease;
  border: 1px solid transparent;
}
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(22,163,74,0.32); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(22,163,74,0.42); }
.btn-ghost { border-color: var(--card-border); color: var(--text); background: #fff; box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

/* ===== Hero ===== */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 120px 6vw 40px; max-width: var(--maxw); margin: 0 auto; }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--card-border);
  padding: 7px 16px; border-radius: 100px; font-size: 0.82rem; color: var(--muted);
  margin-bottom: 28px; box-shadow: var(--shadow);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 0 rgba(13,148,136,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(13,148,136,.5)} 70%{box-shadow:0 0 0 10px rgba(13,148,136,0)} 100%{box-shadow:0 0 0 0 rgba(13,148,136,0)} }
.hero-title {
  font-family: 'Space Grotesk'; font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.04; letter-spacing: -1.5px; margin-bottom: 14px; color: var(--text);
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-role { font-family: 'JetBrains Mono'; font-size: clamp(1rem,2vw,1.35rem); color: var(--accent); margin-bottom: 22px; min-height: 1.6em; }
.rotator::before { content: '> '; color: var(--accent-3); }
.hero-desc { font-size: 1.06rem; color: var(--muted); max-width: 540px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-actions .btn { padding: 13px 22px; }
.hero-socials { display: flex; gap: 26px; }
.hero-socials a { color: var(--muted); font-size: 0.9rem; font-weight: 500; position: relative; transition: color .25s; }
.hero-socials a:hover { color: var(--accent); }

/* Hero photo */
.hero-photo { position: relative; justify-self: center; }
.photo-frame {
  width: clamp(240px, 30vw, 340px); aspect-ratio: 4/5; border-radius: 26px; overflow: hidden;
  border: 4px solid #fff; position: relative; z-index: 2;
  box-shadow: var(--shadow-lg);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.02) saturate(1.03); }
.photo-ring {
  position: absolute; inset: -16px; border-radius: 34px; z-index: 1;
  background: var(--grad); opacity: 0.18; filter: blur(24px); animation: float1 8s ease-in-out infinite;
}
.photo-tag {
  position: absolute; z-index: 3; background: #fff;
  border: 1px solid var(--card-border); padding: 8px 14px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500; white-space: nowrap; color: var(--text);
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 7px;
}
.tag-1 { top: 12%; left: -38px; animation: bob 5s ease-in-out infinite; }
.tag-2 { bottom: 22%; right: -52px; animation: bob 6s ease-in-out infinite .5s; }
.tag-3 { bottom: 4%; left: -20px; animation: bob 5.5s ease-in-out infinite 1s; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* Hero stats */
.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 70px; padding-top: 40px; border-top: 1px solid var(--card-border); }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'Space Grotesk'; font-size: clamp(1.8rem,3.5vw,2.6rem); font-weight: 700; display: inline; color: var(--text); }
.stat-suff { font-family: 'Space Grotesk'; font-size: 1.1rem; color: var(--accent); margin-top: -8px; }
.stat-label { font-size: 0.84rem; color: var(--muted); margin-top: 4px; }

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 100px 6vw; }
.sec-head { margin-bottom: 50px; }
.sec-kicker { font-family: 'JetBrains Mono'; font-size: 0.82rem; color: var(--accent); letter-spacing: 1px; display: block; margin-bottom: 12px; }
.sec-title { font-family: 'Space Grotesk'; font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; letter-spacing: -1px; color: var(--text); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.interest-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.interest-card h3 { font-family: 'Space Grotesk'; margin-bottom: 18px; font-size: 1.15rem; }
.chip-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.chip-list li { color: var(--muted); padding-left: 22px; position: relative; font-size: 0.95rem; }
.chip-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-3); }

/* Figures (notebook visualisations) */
figure.fig { margin: 0; background: #fff; border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
figure.fig img { width: 100%; display: block; background: #fff; }
figure.fig figcaption { padding: 12px 16px; font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--card-border); }
figure.fig figcaption b { color: var(--accent); font-weight: 600; }
.thesis-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.anip-fig { margin-top: 16px; }
.anip-fig img { width: 100%; display: block; background: #fff; border-radius: 10px; border: 1px solid var(--card-border); }
.proj-fig { margin: -6px 0 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--card-border); }
.proj-fig img { width: 100%; display: block; background: #fff; }
.proj-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 4px 0 20px; }
.proj-wide { grid-column: 1 / -1; }

/* ANIP section */
.anip-intro { max-width: 820px; margin-bottom: 36px; }
.anip-intro p { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.anip-links { display: flex; gap: 14px; flex-wrap: wrap; }
.anip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.anip-task { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; transition: all .35s ease; box-shadow: var(--shadow); }
.anip-task:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(22,163,74,0.3); }
.anip-num { font-family: 'JetBrains Mono'; font-size: 0.78rem; color: var(--accent); letter-spacing: 1px; margin-bottom: 10px; }
.anip-task h3 { font-family: 'Space Grotesk'; font-size: 1.2rem; margin-bottom: 12px; }
.anip-task p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; flex-grow: 1; }
.anip-metrics { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.anip-metrics span { font-size: 0.82rem; color: var(--text); background: rgba(22,163,74,0.07); border: 1px solid rgba(22,163,74,0.18); padding: 6px 12px; border-radius: 8px; }
.anip-metrics .metric-hi { background: rgba(13,148,136,0.1); border-color: rgba(13,148,136,0.35); color: #0f766e; font-weight: 600; }
.anip-note { max-width: 900px; margin-top: 30px; color: var(--muted); font-size: 0.98rem; padding: 20px 24px; background: #fff; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; box-shadow: var(--shadow); }
.proj-link { display: inline-block; margin-top: 16px; font-size: 0.88rem; font-weight: 600; color: var(--accent); transition: color .25s; }
.proj-link:hover { color: var(--accent-3); }

/* Thesis */
.thesis { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.thesis-main h3 { font-family: 'Space Grotesk'; font-size: 1.5rem; margin-bottom: 14px; }
.thesis-sub { color: var(--muted); margin-bottom: 14px; }
.thesis-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 22px; }
.thesis-points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.thesis-points li { color: var(--muted); padding-left: 24px; position: relative; font-size: 0.97rem; }
.thesis-points li::before { content: '✦'; position: absolute; left: 0; color: var(--accent); }
.thesis-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.thesis-topics span { font-size: 0.78rem; background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.2); color: #166534; padding: 5px 12px; border-radius: 100px; }
.thesis-results { display: flex; flex-direction: column; gap: 18px; }
.result-card { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px; padding: 22px; }
.result-card.highlight { border-color: rgba(13,148,136,0.4); background: rgba(13,148,136,0.06); }
.result-label { font-size: 0.78rem; color: var(--muted); display: block; margin-bottom: 14px; font-family: 'JetBrains Mono'; }
.result-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--card-border); }
.result-row:last-of-type { border: none; }
.result-row b { font-family: 'Space Grotesk'; color: var(--text); font-size: 1.05rem; }
.result-note { font-size: 0.8rem; color: var(--accent-3); margin-top: 10px; }

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-3)); opacity: 0.4; }
.tl-item { position: relative; padding: 0 0 44px 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -30px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(22,163,74,0.14); }
.tl-dot.edu { background: var(--accent-3); box-shadow: 0 0 0 4px rgba(13,148,136,0.14); }
.tl-date { font-family: 'JetBrains Mono'; font-size: 0.8rem; color: var(--accent); }
.tl-item h3 { font-family: 'Space Grotesk'; font-size: 1.2rem; margin: 6px 0 2px; }
.tl-org { color: var(--accent-3); font-size: 0.92rem; font-weight: 500; }
.tl-item p { color: var(--muted); margin-top: 10px; font-size: 0.97rem; max-width: 760px; }

/* Projects */
.proj-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.proj-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px; transition: all .35s ease; box-shadow: var(--shadow); }
.proj-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(22,163,74,0.3); }
.proj-icon { margin-bottom: 18px; }
.proj-icon .ico { width: 46px; height: 46px; padding: 11px; border-radius: 12px; color: var(--accent); background: rgba(22,163,74,0.08); border: 1px solid var(--card-border); }
.proj-card:hover .proj-icon .ico { background: var(--grad); color: #fff; border-color: transparent; }
.proj-card[hidden] { display: none; }
.proj-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: -14px 0 32px; }
.chip { font: 500 0.88rem 'Inter', sans-serif; color: var(--muted); background: #fff; border: 1px solid var(--card-border); border-radius: 100px; padding: 9px 18px; min-height: 40px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--accent); border-color: rgba(22,163,74,0.4); }
.chip.is-active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(22,163,74,0.25); }
.proj-card h3 { font-family: 'Space Grotesk'; font-size: 1.25rem; margin-bottom: 12px; }
.proj-card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 18px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.proj-tags span { font-size: 0.75rem; background: rgba(22,163,74,0.06); border: 1px solid var(--card-border); padding: 4px 11px; border-radius: 100px; color: var(--muted); }
.proj-logo { width: 46px; height: 46px; border-radius: 11px; object-fit: contain; background: #fff; border: 1px solid var(--card-border); padding: 4px; }
.proj-axes { margin: 4px 0 16px; }
.axes-label { display: block; font-family: 'JetBrains Mono'; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 9px; }
.about-drive { color: var(--text); font-weight: 500; border-left: 3px solid var(--accent); padding-left: 16px; margin-top: 4px; }

.proj-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* Project screenshots */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 18px; }
.shot { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--card-border); box-shadow: var(--shadow); background: #0b0d12; transition: transform .2s, box-shadow .2s; }
.shot:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.shot img { width: 100%; height: auto; display: block; }
.shot-main { grid-column: 1 / -1; }
.shots-cap { grid-column: 1 / -1; font-size: 0.78rem; color: var(--faint); }

/* Live site embed (browser-frame iframe) */
.site-embed { margin: 6px 0 20px; border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.site-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--bg-2); border-bottom: 1px solid var(--card-border); }
.site-dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.site-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(20,83,45,0.16); display: block; }
.site-url { font-family: 'JetBrains Mono'; font-size: 0.8rem; color: var(--muted); background: #fff; border: 1px solid var(--card-border); border-radius: 100px; padding: 4px 14px; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-open { font-size: 0.82rem; font-weight: 600; color: var(--accent); white-space: nowrap; flex-shrink: 0; transition: color .25s; }
.site-open:hover { color: var(--accent-3); }
.site-iframe { width: 100%; height: 540px; border: 0; display: block; background: #fff; }
@media (max-width: 600px) { .site-iframe { height: 400px; } }

/* Honours */
.honours { margin-top: 50px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.honours-title { font-family: 'Space Grotesk'; font-size: 1.3rem; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.honours-title .ico { width: 24px; height: 24px; color: var(--accent); }
.honours-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.honour { display: flex; flex-direction: column; gap: 6px; padding-left: 16px; border-left: 2px solid var(--accent); }
.honour b { font-family: 'Space Grotesk'; color: var(--text); }
.honour span { color: var(--muted); font-size: 0.92rem; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 26px; }
.skill-col { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.skill-col h3 { font-family: 'Space Grotesk'; font-size: 1.15rem; margin-bottom: 18px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-cloud span { font-size: 0.85rem; background: var(--bg-2); border: 1px solid var(--card-border); padding: 7px 14px; border-radius: 10px; color: var(--text); transition: all .25s; cursor: default; }
.tag-cloud span:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.lang-list { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.lang { display: grid; grid-template-columns: 80px 1fr 90px; align-items: center; gap: 12px; }
.lang span { font-size: 0.9rem; font-weight: 500; }
.lang em { font-size: 0.8rem; color: var(--muted); text-align: right; }
.bar { height: 6px; background: rgba(22,163,74,0.12); border-radius: 100px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 100px; }

/* Contact */
.contact { text-align: center; }
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact-title { font-family: 'Space Grotesk'; font-size: clamp(2rem,5vw,3.4rem); font-weight: 700; letter-spacing: -1px; margin: 14px 0 18px; color: var(--text); }
.contact-sub { color: var(--muted); font-size: 1.08rem; margin-bottom: 34px; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.contact-socials { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.contact-socials a { color: var(--muted); font-weight: 500; transition: color .25s; }
.contact-socials a:hover { color: var(--accent); }
.contact-loc { color: var(--faint); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.footer { max-width: var(--maxw); margin: 80px auto 0; padding-top: 30px; border-top: 1px solid var(--card-border); display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; flex-wrap: wrap; gap: 10px; }

/* Icons (inline SVG, Lucide) */
.ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo-tag .ico { color: var(--accent); }

/* Keyboard focus */
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .chip:focus-visible, .lang-switch button:focus-visible { border-radius: 100px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { position: fixed; top: 0; right: -100%; flex-direction: column; background: #fff; width: 70%; height: 100vh; padding: 100px 40px; gap: 28px; transition: right .4s ease; border-left: 1px solid var(--card-border); box-shadow: var(--shadow-lg); }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; z-index: 110; }
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-photo { order: -1; }
  .hero-stats { grid-template-columns: repeat(2,1fr); gap: 26px; }
  .about-grid, .thesis, .proj-grid, .skills-grid, .honours-grid, .anip-grid, .thesis-figs, .proj-figs { grid-template-columns: 1fr; }
  .thesis { padding: 28px; }
  .footer { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .tag-2 { right: -10px; } .tag-1 { left: -10px; }
  .section { padding: 70px 6vw; }
}

/* Respect reduced-motion preference */
@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; }
}
