:root {
  --bg: #0b0f1a;
  --bg-alt: #0e1424;
  --surface: #131a2c;
  --surface-2: #1a2340;
  --border: #243049;
  --text: #e6e9f2;
  --muted: #9aa4bf;
  --accent: #7c9cff;
  --accent-2: #4fd1c5;
  --glow: rgba(124, 156, 255, .28);
  --radius: 18px;
  --c-news: #f5b84b; --c-publications: #a78bfa; --c-education: #4fd1c5; --c-experience: #f472b6;
  --c-projects: #38bdf8; --c-skills: #4ade80; --c-misc: #fb923c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-alt: #eef1f9;
  --surface: #ffffff;
  --surface-2: #eef1fb;
  --border: #dbe0ef;
  --text: #161b2e;
  --muted: #5b6585;
  --accent: #4062e0;
  --accent-2: #0f9d93;
  --glow: rgba(64, 98, 224, .2);
  --shadow: 0 10px 30px rgba(30, 40, 90, .1);
  --c-news: #b7791f; --c-publications: #6d4fd8; --c-education: #0f8a82; --c-experience: #c2347f;
  --c-projects: #0b78b8; --c-skills: #1f9d4f; --c-misc: #c25e12;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.brand { font-weight: 700; letter-spacing: .2px; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--accent); }
.menu { display: flex; gap: .25rem; }
.menu a {
  color: var(--muted); padding: .4rem .7rem; border-radius: 8px; font-size: .92rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.menu a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.menu a.active { color: var(--accent); background: var(--surface); }
.nav-actions { display: flex; gap: .4rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: .95rem;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; }

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--c-experience));
}

/* Hero + bento */
.hero { padding: 3.5rem 0 4rem; position: relative; overflow: hidden; }
.net {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .6; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
}
.bento {
  position: relative; z-index: 1; display: grid; gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "intro intro intro photo"
    "bio bio bio latest"
    "bio bio bio latest"
    "interests interests interests interests";
}
.t-intro { grid-area: intro; display: flex; flex-direction: column; justify-content: center; }
.t-photo { grid-area: photo; padding: 4px; background: conic-gradient(from 160deg, var(--accent), var(--accent-2), var(--c-experience), var(--accent)); }
.t-photo img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; object-position: 50% 25%; border-radius: calc(var(--radius) - 3px); }
.t-bio { grid-area: bio; }
.t-latest { grid-area: latest; display: flex; flex-direction: column; }
.t-interests { grid-area: interests; }

.tile, .card, .skill, .misc-card, .pub, .tl-card, .edu-card, .cert {
  position: relative; background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.t-photo { background: conic-gradient(from 160deg, var(--accent), var(--accent-2), var(--c-experience), var(--accent)); border: 0; }
.tile { padding: 1.6rem; backdrop-filter: blur(8px); }
.t-photo { padding: 4px; }
.tile::before, .card::before, .skill::before, .misc-card::before, .pub::before, .tl-card::before, .edu-card::before, .cert::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
}
.tile:hover::before, .card:hover::before, .skill:hover::before, .misc-card:hover::before, .pub:hover::before, .tl-card:hover::before, .edu-card:hover::before, .cert:hover::before { opacity: 1; }
.t-photo::before { display: none; }
.tile-label {
  margin: 0 0 .9rem; font-family: 'JetBrains Mono', monospace; font-size: .74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: .5rem;
}
.tile-label i { color: var(--accent); }
.eyebrow { color: var(--accent-2); font-family: 'JetBrains Mono', monospace; font-size: .85rem; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 .4rem; letter-spacing: -.02em; }
.role { font-size: 1.2rem; font-weight: 600; margin: 0; color: var(--text); }
.typing { margin: .6rem 0 0; min-height: 1.7em; font-family: 'JetBrains Mono', monospace; font-size: .95rem; color: var(--accent-2); }
.typing .prompt { color: var(--muted); }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; background: var(--accent-2); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bio p { margin: 0 0 1rem; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.bio p:last-child { margin-bottom: 0; }
.bio strong { color: var(--text); }
.latest { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .9rem; flex: 1; align-content: start; }
.latest li { display: grid; gap: .15rem; font-size: .88rem; line-height: 1.5; }
.latest time { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--accent-2); }
.latest span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.more-link { font-size: .85rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.chip {
  font-size: .8rem; padding: .25rem .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 10px;
  font-weight: 600; font-size: .9rem; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; font-family: inherit; transition: transform .15s, border-color .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #07101f; border: 0; }
.btn.primary:hover { color: #07101f; }
.btn.ghost { background: transparent; }

/* Sections */
.section {
  --accent: var(--sec); --glow: color-mix(in srgb, var(--sec) 30%, transparent);
  padding: 4.5rem 0; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 7%, var(--bg)), var(--bg) 75%);
}
.section::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sec), transparent); opacity: .55;
}
#news { --sec: var(--c-news); } #publications { --sec: var(--c-publications); } #education { --sec: var(--c-education); }
#experience { --sec: var(--c-experience); } #projects { --sec: var(--c-projects); } #skills { --sec: var(--c-skills); }
#misc { --sec: var(--c-misc); }
h2 { font-size: 1.8rem; margin: 0 0 .35rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .8rem; }
h2 i[class] {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.05rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}
.section-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem 1rem; }
.section-head h2 { margin-bottom: .35rem; }
.section > .wrap { position: relative; z-index: 1; }
.section::before {
  content: ""; position: absolute; width: 520px; height: 520px; top: -160px; right: -140px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--sec) 20%, transparent), transparent 65%);
}
#publications::before, #experience::before, #skills::before { right: auto; left: -160px; }
.sec-sub { margin: 0 0 1.8rem; color: var(--muted); font-size: .98rem; }
.section-head .sec-sub { margin-bottom: 1.4rem; }

/* Watermark icons + live pulse */
.wm { position: absolute; right: -8px; bottom: -14px; font-size: 6.2rem; line-height: 1; color: var(--accent); opacity: .07; transform: rotate(-12deg); pointer-events: none; transition: opacity .3s, transform .3s; }
.skill:hover .wm, .misc-card:hover .wm, .edu-card:hover .wm { opacity: .14; transform: rotate(-6deg) scale(1.06); }
.skill, .misc-card, .edu-card, .card { overflow: hidden; }
.tag.live::before, .period.live::after {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 1.8s infinite;
}
.tag.live::before { margin-right: .4rem; }
.period.live::after { margin-left: .2rem; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* News */
.news { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .8rem; position: relative; }
.news li {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 1.1rem; align-items: center; padding: .8rem 1.1rem .8rem .8rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); border-radius: 16px;
  transition: transform .2s, border-color .2s;
}
.news li:hover { transform: translateX(4px); border-color: var(--accent); }
.news .date {
  display: grid; place-items: center; align-content: center; gap: 0; height: 64px; border-radius: 12px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.news .date b { font-family: 'JetBrains Mono', monospace; font-size: 1rem; color: var(--accent); line-height: 1.2; }
.news .date span { font-size: .72rem; color: var(--muted); line-height: 1.2; }
.news li p { margin: 0; }

/* Publications */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter {
  padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer;
}
.filter.active, .filter:hover { color: var(--text); border-color: var(--accent); }
.filter.active { background: var(--surface-2); }
.year-group { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 1.4rem; margin-top: 1.4rem; }
.year-label { position: relative; }
.year-label span {
  position: sticky; top: 84px; display: block; font-family: 'JetBrains Mono', monospace; font-weight: 500;
  font-size: 2.1rem; line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(180deg, var(--accent), transparent 130%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.year-items { position: relative; }
.pub {
  padding: 1.2rem 1.3rem; margin-bottom: .8rem; transition: border-color .2s, transform .2s;
}
.pub { --tc: var(--accent); border-left: 4px solid var(--tc); }
.pub[data-type="Workshop"] { --tc: var(--c-publications); }
.pub[data-type="Conference"] { --tc: var(--c-projects); }
.pub[data-type="Book Chapter"] { --tc: var(--c-experience); }
.pub[data-type="Journal"] { --tc: var(--c-skills); }
.pub .tag:first-child { background: color-mix(in srgb, var(--tc) 18%, transparent); color: var(--tc); }
.pub:hover { border-color: var(--tc); transform: translateY(-2px); box-shadow: var(--shadow); }
.pub h3 { font-size: 1.02rem; margin: 0 0 .35rem; line-height: 1.4; }
.pub .authors { color: var(--muted); font-size: .9rem; margin: 0; }
.pub .authors strong { color: var(--text); }
.pub .venue { font-size: .88rem; margin: .25rem 0 .7rem; font-style: italic; color: var(--muted); }
.pub-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tag {
  font-size: .72rem; padding: .15rem .6rem; border-radius: 6px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.tag.note { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
.pill-link {
  font-size: .8rem; padding: .2rem .65rem; border-radius: 6px; border: 1px solid var(--border);
  color: var(--text); display: inline-flex; gap: .4rem; align-items: center;
}
.pill-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Education */
.edu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.edu-card { padding: 1.5rem; display: flex; flex-direction: column; gap: .35rem; border-top: 3px solid var(--accent); }
.edu-card h3 { margin: .7rem 0 0; font-size: 1.12rem; line-height: 1.35; }
.edu-card .loc, .tl-meta .loc { color: var(--muted); font-size: .85rem; margin: .1rem 0 0; display: flex; gap: .45rem; align-items: center; }
.edu-card .loc i, .tl-meta .loc i { color: var(--accent); }
.edu-card .note { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; position: relative; z-index: 1; }
.period {
  display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; font-family: 'JetBrains Mono', monospace; font-size: .76rem;
  padding: .25rem .65rem; border-radius: 999px; color: var(--accent); white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Timeline */
.timeline { position: relative; padding-left: 1.8rem; display: grid; gap: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: .5; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -1.8rem; top: .5rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 14px var(--glow);
}
.tl-card { padding: 1.2rem 1.4rem; }
.tl-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2rem 1rem; }
.tl-card h3 { margin: 0; font-size: 1.05rem; }
.tl-org { color: var(--accent); font-weight: 500; margin: 0; }
.tl-meta { color: var(--muted); font-size: .85rem; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.tl-card ul { margin: .9rem 0 0; padding-left: 0; list-style: none; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.tl-card li { margin-bottom: .45rem; padding-left: 1.6rem; position: relative; }
.tl-card li::before { content: "\f00c"; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .7rem; position: absolute; left: 0; top: .32rem; color: var(--accent); }
.tl-card .note { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; }

/* Projects */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.card { display: flex; flex-direction: column; padding: 1.4rem; border-top: 3px solid var(--accent); }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.card-top i {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.1rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.card p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; flex: 1; }
.card .chips { margin: 0 0 1rem; gap: .4rem; }
.card .chip { font-size: .72rem; padding: .15rem .55rem; }
.card-links { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Skills */
.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.skill { padding: 1.3rem 1.4rem; }
.skill:nth-child(2), .skill:nth-child(4), .skill:nth-child(5) { grid-column: span 2; }
.skill h3 { margin: 0 0 .8rem; font-size: 1rem; display: flex; align-items: center; gap: .6rem; }
.skill h3 i {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: .9rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.skill .chips { margin: 0; gap: .4rem; }
.skill .chip { font-size: .78rem; transition: border-color .2s, color .2s, background .2s; position: relative; z-index: 1; }
.skill .chip:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Misc */
.misc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.misc-card { padding: 1.4rem; }
.misc-card h3 { margin: 0 0 .8rem; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; }
.misc-card h3 i { color: var(--accent); }
.misc-card ul { margin: 0; padding-left: 0; list-style: none; color: color-mix(in srgb, var(--text) 85%, var(--muted)); position: relative; z-index: 1; }
.misc-card li { margin-bottom: .55rem; padding-left: 1.4rem; position: relative; }
.misc-card li::before { content: "\f054"; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .65rem; position: absolute; left: 0; top: .4rem; color: var(--accent); }

/* Certificates */
.subhead { margin: 2.4rem 0 1.2rem; font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; }
.subhead i { color: var(--accent); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cert {
  display: flex; flex-direction: column; text-align: left; padding: .7rem; gap: .25rem; font: inherit; color: inherit;
  cursor: zoom-in; transition: transform .2s, border-color .2s;
}
.cert:hover { transform: translateY(-3px); border-color: var(--accent); }
.cert img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; border-radius: 8px; background: #fff; margin-bottom: .4rem; }
.cert-t { font-weight: 600; font-size: .9rem; line-height: 1.35; }
.cert-s { font-size: .78rem; color: var(--muted); }
.cert-n { font-size: .74rem; color: var(--muted); margin-top: .2rem; }
.lightbox { border: 0; background: transparent; padding: 0; max-width: min(1100px, 94vw); max-height: 92vh; color: #fff; text-align: center; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 10px; background: #fff; }
.lightbox p { margin: .8rem 0 0; font-size: .9rem; }
.lb-close { position: absolute; top: -14px; right: -14px; z-index: 2; }

/* Footer */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; text-align: center; position: relative; }
.to-top {
  margin-left: .8rem; width: 30px; height: 30px; display: inline-grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--border);
}

/* Motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: transform .18s ease-out, border-color .2s, box-shadow .2s; will-change: transform;
}
.tilt:hover { --ty: -4px; }
.reveal.tilt { transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .tag.live::before, .period.live::after { animation: none; }
  .tilt { transform: none; }
  * { transition-duration: 0s !important; }
}

/* Responsive */
@media (max-width: 980px) {
  .edu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-group { grid-template-columns: 1fr; gap: .6rem; }
  .year-label span { position: static; font-size: 1.6rem; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill:nth-child(n) { grid-column: auto; }
  .skill:nth-child(2), .skill:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 880px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "intro" "bio" "latest" "interests";
  }
  .t-photo { justify-self: center; width: min(300px, 78vw); aspect-ratio: 1; }
  .t-photo img { min-height: 0; height: 100%; object-position: 50% 30%; }
  .hero { padding-top: 1.5rem; }
  .menu-btn { display: inline-block; }
  .menu {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem;
    background: var(--bg); border-bottom: 1px solid var(--border); display: none;
  }
  .menu.open { display: flex; }
  .menu a { padding: .7rem .5rem; }
}
@media (max-width: 560px) {
  .edu-grid { grid-template-columns: minmax(0, 1fr); }
  .news li { grid-template-columns: 62px 1fr; gap: .8rem; }
  .news .date { height: 56px; }
  .tl-meta { align-items: flex-start; }
  .section { padding: 3.2rem 0; }
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
  .skill:nth-child(n) { grid-column: auto; }
  .tile:not(.t-photo) { padding: 1.3rem; }
}
