/* ==========================================================================
   Portfolio front-end: calm dark theme, one accent colour
   ========================================================================== */
:root {
  --bg: #0a0e17;
  --bg-soft: #0e1422;
  --surface: #111827;
  --surface-2: #151d30;
  --line: rgba(148, 163, 184, .14);
  --line-hover: rgba(34, 211, 238, .5);
  --text: #e2e8f0;
  --heading: #f8fafc;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #8b5cf6;
  --grad: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 100%);
  --ok: #34d399;
  --font: "Inter", "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 16px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(800px 480px at 92% -4%, rgba(139,92,246,.14), transparent 60%), radial-gradient(700px 480px at -4% 30%, rgba(34,211,238,.09), transparent 60%), radial-gradient(700px 480px at 70% 108%, rgba(139,92,246,.09), transparent 60%); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #67e8f9; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--heading); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
::selection { background: rgba(34, 211, 238, .28); }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* scroll progress */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1100; background: var(--grad); }

/* ---------- buttons ---------- */
.btn-ai, .btn-ghost {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 24px; border-radius: 999px; font-family: var(--font); font-weight: 600; font-size: 15px;
  border: 1px solid transparent; line-height: 1.2;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, color .3s, background .3s;
}
.btn-ai { background: var(--grad); color: #04101a; }
.btn-ai::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transition: transform .6s var(--ease); }
.btn-ai:hover { color: #04101a; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(34, 211, 238, .28); }
.btn-ai:hover::after { transform: translateX(120%) skewX(-20deg); }
.btn-ghost { background: rgba(255,255,255,.02); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { color: var(--accent); border-color: var(--line-hover); background: rgba(34, 211, 238, .06); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(34, 211, 238, .1); }
.btn-ai i, .btn-ghost i { transition: transform .3s var(--ease); }
.btn-ai:hover .bi-arrow-right, .btn-ghost:hover .bi-arrow-right { transform: translateX(4px); }
.btn-ai:hover .bi-download, .btn-ghost:hover .bi-download { transform: translateY(2px); }
.btn-ai:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- navbar ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--nav-h); display: flex; align-items: center; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.nav.scrolled { background: rgba(10, 14, 23, .85); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.brand:hover { color: var(--heading); }
.brand img { height: 34px; width: auto; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { position: relative; padding: 8px 14px; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--grad); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--heading); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta { padding: 9px 20px; font-size: 14px; }
.burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 22px; cursor: pointer; align-items: center; justify-content: center; }
.mobile-resume { display: none !important; }

@media (max-width: 991px) {
  .burger { display: inline-flex; }
  .nav-right { display: none; }
  .nav-links { position: fixed; top: var(--nav-h); left: 12px; right: 12px; flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .25s var(--ease); }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 14px; border-radius: 8px; }
  .nav-links a::after { display: none; }
  .nav-links a.active { background: rgba(56, 189, 248, .08); color: var(--accent); }
  .nav-links .mobile-resume { display: inline-flex !important; justify-content: center; margin-top: 6px; color: #04101a; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: calc(var(--nav-h) + 30px) 0 70px; overflow: hidden; }
#neural { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(17, 24, 39, .7); backdrop-filter: blur(6px); font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .15); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.hero h1 { font-size: clamp(36px, 5.6vw, 62px); letter-spacing: -.03em; margin-bottom: 10px; }
.hero h1 .greet { display: block; font-size: .36em; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 8px; font-family: var(--font); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .role { color: var(--accent); font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.typed-line { font-size: clamp(18px, 2.2vw, 24px); color: var(--text); margin-bottom: 16px; font-weight: 500; min-height: 1.5em; }
.typed-line .typed { color: var(--accent); }
.typed-cursor { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -3px; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.intro { color: var(--muted); font-size: 17px; max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px; }
.chip { font-size: 13px; padding: 5px 13px; border-radius: 999px; color: #b6c2d6; border: 1px solid var(--line); background: rgba(17, 24, 39, .7); transition: all .25s var(--ease); }
.chip:hover { border-color: var(--line-hover); color: var(--accent); transform: translateY(-2px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 17px; background: rgba(255,255,255,.02); transition: all .3s var(--ease); }
.socials a:hover { color: #04101a; background: var(--grad); border-color: transparent; transform: translateY(-4px) rotate(-8deg); box-shadow: 0 10px 24px rgba(34, 211, 238, .28); }

.hero-visual { display: flex; justify-content: center; }
.avatar-wrap { position: relative; width: min(380px, 76vw); aspect-ratio: 1; }
.avatar-wrap::before, .avatar-wrap::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, .3); animation: spin 36s linear infinite; }
.avatar-wrap::after { inset: -34px; border-color: rgba(139, 92, 246, .28); animation-duration: 54s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 2px solid transparent; background: linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box, var(--grad) border-box; box-shadow: 0 0 60px rgba(34, 211, 238, .18), 0 0 110px rgba(139, 92, 246, .14); }
.avatar img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.avatar-wrap:hover .avatar img { transform: scale(1.06); }
.float-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 14px; background: rgba(10, 16, 30, .88); backdrop-filter: blur(8px); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; white-space: nowrap; animation: floaty 6s ease-in-out infinite; transition: border-color .25s, box-shadow .25s; }
.float-chip i { color: var(--accent); }
.float-chip:hover { border-color: var(--line-hover); box-shadow: 0 0 22px rgba(34, 211, 238, .25); }
.float-chip.p1 { top: 6%; right: -8%; }
.float-chip.p2 { top: 44%; left: -14%; animation-delay: -2s; }
.float-chip.p3 { bottom: 6%; right: -2%; animation-delay: -4s; }
.float-chip.p4 { bottom: -2%; left: 6%; animation-delay: -1s; }
@keyframes floaty { 50% { transform: translateY(-11px); } }

@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
  .avatar-wrap { width: min(250px, 62vw); }
  .float-chip { font-size: 12px; padding: 7px 12px; }
  .float-chip.p1 { right: -16%; } .float-chip.p2 { left: -18%; }
}

/* ---------- section scaffolding ---------- */
.section { position: relative; padding: 104px 0; }
.sec-head { max-width: 720px; margin-bottom: 52px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); margin-bottom: 16px; letter-spacing: .02em; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 12px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }
.sub-title { font-size: 22px; margin: 64px 0 24px; display: flex; align-items: center; gap: 14px; }
.sub-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.empty { text-align: center; color: var(--muted); padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* gradient-border card: shared hover language */
.gb { position: relative; background: var(--surface); border-radius: 20px; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.gb:hover { transform: translateY(-6px); border-color: var(--line-hover); box-shadow: 0 22px 46px rgba(0, 0, 0, .4), 0 0 0 1px rgba(34, 211, 238, .12); }

/* ===== ABOUT: photo + text, education as cards ===== */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.about-photo { position: relative; }
.about-photo::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border-radius: 26px; border: 1px solid rgba(139, 92, 246, .5); transition: inset .4s var(--ease); z-index: 0; }
.about-photo:hover::before { inset: 8px -8px -8px 8px; }
.about-photo .frame { position: relative; z-index: 1; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.about-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .8s var(--ease); }
.about-photo:hover img { transform: scale(1.05); }
.about-photo .frame::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 18px var(--accent); opacity: 0; }
.about-photo:hover .frame::after { opacity: 1; animation: scan 2.4s linear infinite; }
@keyframes scan { to { top: 100%; } }
.caption { position: relative; z-index: 1; font-size: 14px; color: var(--muted); text-align: center; margin-top: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--accent-2); text-transform: uppercase; margin-bottom: 8px; display: block; }
.headline { font-size: clamp(24px, 3.2vw, 36px); margin-bottom: 16px; }
.about-text p { color: #b3bfd1; }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lang-row .chip i { color: var(--accent); margin-right: 6px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.edu { padding: 28px 26px; overflow: hidden; }
.edu::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.edu:hover::before { transform: scaleX(1); }
.edu-ic { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 22px; color: var(--accent); background: rgba(34, 211, 238, .08); margin-bottom: 18px; transition: all .35s var(--ease); }
.edu:hover .edu-ic { color: #04101a; background: var(--grad); transform: rotate(-8deg) scale(1.08); }
.edu-period { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--accent-2); letter-spacing: .04em; margin-bottom: 6px; }
.edu h4 { font-size: 19px; margin-bottom: 6px; }
.edu .org { color: var(--muted); font-size: 15px; margin: 0; }
.edu .grade { display: inline-block; margin-top: 14px; font-size: 13px; padding: 3px 12px; border-radius: 999px; color: var(--ok); background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .25); }
.edu ul { margin-top: 12px; display: grid; gap: 6px; }
.edu li { position: relative; padding-left: 16px; color: #b3bfd1; font-size: 14.5px; }
.edu li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ===== EXPERIENCE: zig-zag timeline ===== */
.zz { position: relative; display: grid; gap: 28px; }
.zz::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: linear-gradient(var(--accent), var(--accent-2), transparent); }
.zz-item { position: relative; width: calc(50% - 44px); padding: 24px 26px; }
.zz-item:nth-child(even) { margin-left: auto; }
.zz-item::after { content: ""; position: absolute; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 16px rgba(34, 211, 238, .6); transition: background .3s, transform .3s; }
.zz-item:nth-child(odd)::after { right: -53px; }
.zz-item:nth-child(even)::after { left: -53px; }
.zz-item:hover::after { background: var(--accent); transform: scale(1.25); }
.zz-item::before { content: ""; position: absolute; top: 37px; width: 36px; height: 1px; background: var(--line-hover); }
.zz-item:nth-child(odd)::before { right: -36px; }
.zz-item:nth-child(even)::before { left: -36px; }
.zz-period { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 12px; border-radius: 999px; color: var(--accent); background: rgba(34, 211, 238, .08); margin-bottom: 10px; }
.zz-item h4 { font-size: 20px; margin-bottom: 2px; }
.zz-item .org { color: var(--muted); margin: 0; font-size: 15px; }
.zz-item ul { margin-top: 12px; display: grid; gap: 6px; }
.zz-item li { position: relative; padding-left: 18px; color: #b3bfd1; font-size: 15px; }
.zz-item li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent-2); font-size: 13px; top: 1px; }
@media (max-width: 767px) {
  .zz::before { left: 8px; }
  .zz-item { width: auto; margin-left: 34px !important; }
  .zz-item::after { left: -34px !important; right: auto !important; }
  .zz-item::before { left: -22px !important; right: auto !important; width: 20px; }
}

/* ===== PROJECTS: image-first cards with reveal overlay ===== */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.filter { font-family: var(--font); font-size: 14px; font-weight: 500; padding: 8px 20px; border-radius: 999px; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.03); border: 1px solid var(--line); transition: all .25s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--line-hover); transform: translateY(-2px); }
.filter.active { color: #04101a; background: var(--grad); border-color: transparent; font-weight: 600; box-shadow: 0 8px 22px rgba(34, 211, 238, .22); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.proj { position: relative; aspect-ratio: 4/4.4; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.proj.hide { display: none; }
.proj:hover { transform: translateY(-8px); border-color: var(--line-hover); box-shadow: 0 26px 50px rgba(0, 0, 0, .45), 0 0 40px rgba(34, 211, 238, .1); }
.proj-img, .proj-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.proj-img img { object-fit: cover; transition: transform .8s var(--ease); }
.proj:hover .proj-img img { transform: scale(1.1); }
.proj-ph { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 22%; font-size: 56px; color: rgba(34, 211, 238, .45); background: radial-gradient(circle at 70% 20%, rgba(139,92,246,.3), transparent 55%), linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px); background-size: auto, 26px 26px, 26px 26px; }
.proj-badge { position: absolute; z-index: 3; top: 16px; right: 16px; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--grad); color: #04101a; }
.proj-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(5, 9, 20, .92) 82%); transition: background .45s; }
.proj:hover .proj-shade { background: linear-gradient(180deg, rgba(5, 9, 20, .45), rgba(5, 9, 20, .96) 55%); }
.proj-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 24px 24px 22px; }
.proj-body .cat { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.proj-body h3 { font-size: 22px; margin: 4px 0 0; }
.proj-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ease), opacity .4s; }
.proj:hover .proj-more, .proj:focus-within .proj-more { grid-template-rows: 1fr; opacity: 1; }
.proj-more > div { overflow: hidden; }
.proj-more p { color: #c3cee0; font-size: 14.5px; margin: 12px 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 3px 10px; border-radius: 6px; color: #cfe9f2; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .2); }
.proj-links { display: flex; gap: 10px; margin-top: 14px; }
.proj-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 7px 16px; border-radius: 999px; background: var(--grad); color: #04101a; transition: transform .25s var(--ease), box-shadow .25s; }
.proj-links a + a { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--line); }
.proj-links a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(34, 211, 238, .25); color: #04101a; }
.proj-links a + a:hover { color: var(--accent); }
@media (hover: none) { .proj-more { grid-template-rows: 1fr; opacity: 1; } .proj { aspect-ratio: auto; min-height: 420px; } }

/* ===== PUBLICATIONS: wide rows with accent bar ===== */
.pub-list { display: grid; gap: 16px; max-width: 980px; margin-inline: auto; }
.pub { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 22px; align-items: center; padding: 24px 28px 24px 30px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), border-color .3s, background .3s, box-shadow .35s; }
.pub::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); transition: width .35s var(--ease); }
.pub:hover { transform: translateX(8px); border-color: var(--line-hover); background: var(--surface-2); box-shadow: 0 16px 36px rgba(0, 0, 0, .35); }
.pub:hover::before { width: 7px; }
.pub-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 23px; color: var(--accent-2); background: rgba(139, 92, 246, .1); transition: all .35s var(--ease); }
.pub:hover .pub-ic { color: #04101a; background: var(--grad); }
.pub h4 { font-size: 19px; line-height: 1.4; margin-bottom: 6px; }
.pub .authors { color: #b3bfd1; font-size: 15px; margin: 0 0 8px; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-tags span { font-size: 12.5px; padding: 3px 12px; border-radius: 999px; color: var(--muted); background: rgba(148, 163, 184, .08); }
.pub-tags .ok { color: var(--ok); background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .25); }
.pub-tags .pending { color: #fbbf24; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .25); }
.pub .abs { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; }
.pub-go { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); color: var(--text); font-size: 18px; transition: all .3s var(--ease); }
.pub-go:hover { background: var(--grad); border-color: transparent; color: #04101a; transform: rotate(45deg); }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; gap: 14px; } .pub-go { justify-self: start; } }

/* ===== SKILLS: ring tiles ===== */
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.skill { padding: 28px 20px 24px; text-align: center; overflow: hidden; }
.skill::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, .14), transparent 65%); opacity: 0; transition: opacity .4s; }
.skill:hover::before { opacity: 1; }
.ring { --p: 0; position: relative; width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2) calc(var(--p) * 1%), rgba(148, 163, 184, .12) 0); transition: box-shadow .35s, transform .35s var(--ease); display: grid; place-items: center; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.skill:hover .ring { box-shadow: 0 0 30px rgba(34, 211, 238, .3); transform: scale(1.05); }
.ring b { position: relative; font-family: var(--font-head); font-size: 24px; color: var(--heading); font-weight: 600; }
.ring b small { font-size: 13px; color: var(--muted); font-weight: 500; }
.skill h4 { position: relative; font-size: 17px; margin: 0 0 4px; }
.skill p { position: relative; color: var(--muted); font-size: 14px; margin: 0; }

/* ===== RESUME: document window ===== */
.window { max-width: 980px; margin-inline: auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 30px 70px rgba(0, 0, 0, .45); transition: border-color .3s, box-shadow .4s; }
.window:hover { border-color: var(--line-hover); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 50px rgba(34, 211, 238, .08); }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.win-dots { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13.5px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: #475569; display: inline-block; }
.win-dots i:nth-child(1) { background: #f87171; } .win-dots i:nth-child(2) { background: #fbbf24; } .win-dots i:nth-child(3) { background: #34d399; }
.win-dots span { margin-left: 8px; }
.win-actions { display: flex; gap: 8px; }
.win-actions a { font-size: 13.5px; font-weight: 600; padding: 7px 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; transition: all .25s var(--ease); }
.win-actions a.dl { background: var(--grad); color: #04101a; }
.win-actions a.op { border: 1px solid var(--line); color: var(--text); }
.win-actions a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(34, 211, 238, .2); }
.win-actions a.op:hover { color: var(--accent); border-color: var(--line-hover); }
.window iframe { width: 100%; height: 82vh; min-height: 520px; border: 0; display: block; background: #fff; }

/* ===== CONTACT: gradient panel ===== */
.contact-panel { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; border-radius: 30px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.contact-side { position: relative; padding: 44px 40px; background: radial-gradient(circle at 0% 0%, rgba(34, 211, 238, .22), transparent 55%), radial-gradient(circle at 100% 100%, rgba(139, 92, 246, .28), transparent 60%), #0d1426; display: flex; flex-direction: column; gap: 26px; }
.contact-side h3 { font-size: 26px; margin: 0; }
.contact-side > p { color: #b3bfd1; margin: -14px 0 0; }
.info-rows { display: grid; gap: 6px; }
.info { display: flex; align-items: center; gap: 16px; padding: 12px 14px; margin: 0 -14px; border-radius: 14px; transition: background .25s, transform .3s var(--ease); }
.info:hover { background: rgba(255, 255, 255, .05); transform: translateX(6px); }
.info .ic { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; color: var(--accent); background: rgba(34, 211, 238, .1); flex-shrink: 0; transition: all .3s var(--ease); }
.info:hover .ic { background: var(--grad); color: #04101a; transform: rotate(-8deg); }
.info h5 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 1px; font-weight: 500; font-family: var(--font); }
.info p, .info a { margin: 0; font-size: 16px; color: var(--text); word-break: break-word; }
.info a:hover { color: var(--accent); }
.contact-form { padding: 44px 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border-radius: 12px; font: inherit; font-size: 15.5px; color: var(--text); background: var(--bg); border: 1px solid var(--line); outline: none; transition: border-color .25s, box-shadow .25s; }
.field input::placeholder, .field textarea::placeholder { color: #5b6b85; }
.field input:hover, .field textarea:hover { border-color: rgba(34, 211, 238, .3); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12); }
.field textarea { resize: vertical; min-height: 140px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 15px; }
.flash.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .35); color: #86efac; }
.flash.err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .35); color: #fca5a5; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact-panel { grid-template-columns: 1fr; } .contact-side, .contact-form { padding: 30px 24px; } }

.custom-text { color: #b3bfd1; font-size: 17px; max-width: 800px; }

/* footer + back to top */
.footer { border-top: 1px solid var(--line); padding: 34px 0; text-align: center; }
.footer .socials { justify-content: center; margin-bottom: 14px; }
.footer p { color: var(--muted); font-size: 14px; margin: 0; }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: #04101a; background: var(--grad); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease); box-shadow: 0 10px 26px rgba(34, 211, 238, .3); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #04101a; transform: translateY(-4px); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 991px) {
  .section { padding: 76px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-photo { max-width: 380px; margin-inline: auto; }
}
@media (max-width: 575px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .proj-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
