/* ==========================================================================
   Tanjid Shuvro Portfolio
   Structure: tokens, base, layout, components, sections, utilities
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --blue: #2563eb;
  --purple: #7c3aed;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --nav-h: 68px;
  --font: "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.75; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; color: var(--ink); line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 300; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.section { padding: 88px 0; }
.section.alt { background: var(--white); }
.section.dark { background: var(--ink); color: #cbd5e1; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 8px; }
.section.dark .section-head p { color: #94a3b8; }
.eyebrow { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 26px; border-radius: 10px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; transition: 0.2s; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn-ghost { border-color: #cbd5e1; background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--white); border-color: var(--teal); color: var(--teal-dark); }
.btn-sm { padding: 8px 18px; font-size: 0.92rem; }
.btn-teal-outline { border-color: var(--teal); color: var(--teal-dark); background: transparent; }
.btn-teal-outline:hover { background: var(--teal); color: #fff; }

/* ---------- Navbar ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s; }
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.55rem; font-weight: 700; color: var(--ink); }
.brand span { color: var(--teal); }
.nav-links { display: none; align-items: center; gap: 22px; font-weight: 500; font-size: 0.97rem; }
.nav-links a:not(.btn) { position: relative; padding: 4px 0; transition: color 0.2s; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--teal-dark); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--teal); border-radius: 2px; }
.nav-toggle { background: none; border: 0; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.mobile-menu { position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 24px 20px; display: none; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; z-index: 99; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-weight: 500; }
.mobile-menu .btn { margin-top: 16px; width: 100%; border-bottom: 0; }
@media (min-width: 1040px) {
  .nav-links { display: flex; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 64px) 0 88px; background: var(--white); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: 40px; background: radial-gradient(circle, rgba(20, 184, 166, 0.22), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; gap: 48px; align-items: center; position: relative; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: #f0fdfa; border: 1px solid #99f6e4; color: var(--teal-dark); font-size: 0.85rem; font-weight: 600; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 700; margin: 18px 0; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero p.lead { font-size: 1.12rem; max-width: 560px; color: #475569; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-photo { justify-self: center; position: relative; }
.hero-photo .frame { width: 280px; height: 330px; border-radius: 22px; overflow: hidden; border: 5px solid #fff; box-shadow: var(--shadow-lg); transform: rotate(3deg); transition: transform 0.5s; background: #e2e8f0; }
.hero-photo .frame:hover { transform: rotate(0); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.4fr 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 48px; align-items: start; }
.about-text h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 22px; }
.about-text p + p { margin-top: 18px; }
.about-text strong { color: var(--ink); }
.achieve { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.achieve h4 { font-size: 1.25rem; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.achieve-item { display: flex; gap: 18px; }
.achieve-item + .achieve-item { margin-top: 26px; }
.achieve-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; transition: 0.3s; }
.ic-blue { background: #eff6ff; color: var(--blue); }
.ic-teal { background: #f0fdfa; color: var(--teal-dark); }
.ic-purple { background: #f5f3ff; color: var(--purple); }
.achieve-item:hover .ic-blue { background: var(--blue); color: #fff; }
.achieve-item:hover .ic-teal { background: var(--teal); color: #fff; }
.achieve-item:hover .ic-purple { background: var(--purple); color: #fff; }
.achieve-item h5 { font-size: 1.08rem; }
.achieve-item p { font-size: 0.93rem; color: var(--muted); margin-top: 4px; line-height: 1.65; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Ventures ---------- */
.venture-grid { display: grid; gap: 24px; }
.venture { background: var(--ink-2); border: 1px solid #334155; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; transition: 0.3s; }
.venture:hover { transform: translateY(-4px); }
.venture.v-teal:hover { border-color: var(--teal); }
.venture.v-blue:hover { border-color: var(--blue); }
.venture.v-purple:hover { border-color: var(--purple); }
.venture-logo { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 4px solid #334155; display: grid; place-items: center; overflow: hidden; margin-bottom: 22px; font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.venture-logo img { width: 100%; height: 100%; object-fit: cover; padding: 4px; }
.venture h3 { font-size: 1.4rem; margin-bottom: 10px; }
.badge { align-self: flex-start; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; color: #fff; margin-bottom: 16px; }
.b-teal { background: var(--teal-dark); }
.b-blue { background: var(--blue); }
.b-purple { background: var(--purple); }
.venture p { font-size: 0.94rem; color: #94a3b8; flex: 1; }
.venture a.more { margin-top: 22px; font-weight: 600; font-size: 0.95rem; color: #5eead4; display: inline-flex; gap: 8px; align-items: center; }
.venture a.more:hover { color: #fff; }
@media (min-width: 760px) { .venture-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Expertise ---------- */
.cards-3 { display: grid; gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); transition: 0.3s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .icon { width: 56px; height: 56px; border-radius: 12px; background: var(--bg); color: var(--teal-dark); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 20px; transition: 0.3s; }
.card:hover .icon { background: var(--teal); color: #fff; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { font-size: 0.95rem; color: #475569; }
@media (min-width: 820px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Author profiles ---------- */
.author-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.author-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; transition: 0.25s; }
.author-card:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-4px); }
.author-card .logo-box { height: 64px; width: 100%; display: grid; place-items: center; }
.author-card img { max-height: 100%; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: 0.25s; }
.author-card:hover img { filter: none; opacity: 1; }
.author-card .name { font-weight: 600; color: var(--ink); font-size: 1rem; }
.author-card .cta { font-size: 0.82rem; color: var(--teal-dark); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.author-card.featured { border-color: #99f6e4; background: linear-gradient(180deg, #f0fdfa, #fff); }
.text-logo { font-weight: 700; font-size: 1.15rem; color: var(--ink); }

/* ---------- Web games ---------- */
.game-grid { display: grid; gap: 24px; }
.game { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; transition: 0.3s; display: flex; flex-direction: column; }
.game:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-3px); }
.game .icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 18px; transition: 0.3s; }
.game .tag { display: inline-block; font-size: 0.75rem; font-weight: 600; background: var(--bg); color: var(--muted); padding: 2px 10px; border-radius: 999px; margin-bottom: 12px; align-self: flex-start; }
.game h3 { font-size: 1.35rem; margin-bottom: 8px; }
.game p { color: #475569; font-size: 0.97rem; flex: 1; }
.game .play { margin-top: 20px; font-weight: 600; color: var(--teal-dark); display: inline-flex; gap: 8px; align-items: center; }
.game:hover .play { text-decoration: underline; }
@media (min-width: 760px) { .game-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-inline: auto; } }

/* ---------- Awards ---------- */
.award-grid { display: grid; gap: 24px; }
.award { position: relative; height: 320px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #0f172a; }
.award img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.award:hover img { transform: scale(1.08); }
.award::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.25) 55%, transparent); }
.award .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; z-index: 1; color: #fff; }
.award .cap::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--teal); margin-bottom: 12px; }
.award h3 { color: #fff; font-size: 1.28rem; }
.award p { color: #cbd5e1; font-size: 0.92rem; }
@media (min-width: 760px) { .award-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Workshops ---------- */
.event-feature { display: grid; background: linear-gradient(135deg, var(--ink) 0%, #134e4a 100%); color: #e2e8f0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 64px; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px; background: rgba(255, 255, 255, 0.06); text-align: center; gap: 2px; }
.event-date .day { font-size: 4rem; font-weight: 700; line-height: 1; color: #5eead4; }
.event-date .month { font-size: 1.2rem; font-weight: 600; color: #fff; }
.event-date .year { font-size: 0.95rem; color: #94a3b8; }
.event-body { padding: 36px; }
.event-status { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #fbbf24; color: #422006; margin-bottom: 14px; }
.event-status.done { background: #475569; color: #e2e8f0; }
.event-body h3 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
.event-meta { display: flex; flex-direction: column; gap: 6px; font-size: 0.97rem; color: #cbd5e1; }
.event-meta i { width: 22px; color: #5eead4; }
@media (min-width: 760px) { .event-feature { grid-template-columns: 240px 1fr; } }

.sub-head { font-size: 1.4rem; text-align: center; margin-bottom: 8px; }
.sub-lead { text-align: center; color: var(--muted); margin-bottom: 36px; }
.feedback-grid { display: grid; gap: 32px; }
.fb-col { display: flex; flex-direction: column; gap: 16px; }
.fb-banner { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #e2e8f0; border: 1px solid var(--line); }
.fb-banner img { width: 100%; height: 100%; object-fit: contain; }
.fb-col h3 { font-size: 1.15rem; }
.fb-meta { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; font-weight: 500; color: var(--teal-dark); }
.fb-meta i { margin-right: 6px; opacity: 0.7; }
blockquote.quote { margin: 0; background: var(--white); border: 1px solid #f1f5f9; border-radius: 14px; padding: 22px; box-shadow: var(--shadow-sm); font-style: italic; font-size: 0.93rem; color: #475569; flex: 1; transition: box-shadow 0.25s; }
blockquote.quote:hover { box-shadow: var(--shadow); }
blockquote.quote i.fa-quote-left { display: block; font-size: 1.5rem; color: #99f6e4; margin-bottom: 8px; }
blockquote.quote footer { font-style: normal; font-weight: 700; color: var(--ink); font-size: 0.9rem; text-align: right; border-top: 1px solid #f1f5f9; margin-top: 14px; padding-top: 10px; }
@media (min-width: 700px) { .feedback-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feedback-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Testimonials ---------- */
.t-grid { display: grid; gap: 24px; }
.t-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; transition: 0.3s; }
.t-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.t-card .mark { color: var(--teal); opacity: 0.4; font-size: 2rem; margin-bottom: 12px; }
.t-card blockquote { margin: 0 0 24px; font-style: italic; color: #475569; line-height: 1.8; }
.t-by { display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.t-by img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.25); background: #e2e8f0; }
.t-by strong { display: block; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.t-by span { font-size: 0.8rem; color: var(--teal-dark); font-weight: 500; }
@media (min-width: 860px) { .t-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Gallery ---------- */
.gallery-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.gallery-head h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.gallery-head p { color: var(--muted); }
.gallery-swiper { padding-bottom: 46px !important; }
.g-slide { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #e2e8f0; box-shadow: var(--shadow); }
.g-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.g-slide:hover img { transform: scale(1.06); }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent); color: #fff; font-weight: 500; font-size: 0.95rem; text-align: center; }
.swiper-pagination-bullet-active { background: var(--teal) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--teal-dark) !important; transform: scale(0.6); }
.no-swiper .swiper-wrapper { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.no-swiper .swiper-slide { flex: 0 0 80%; scroll-snap-align: start; }

.gallery-all { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip { border: 1px solid var(--line); background: var(--white); color: var(--text); border-radius: 999px; padding: 6px 18px; font-size: 0.9rem; font-weight: 500; transition: 0.2s; }
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.g-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.g-grid .g-slide { aspect-ratio: 1 / 1; }
.g-more { display: flex; justify-content: center; margin-top: 28px; }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; }
@media (min-width: 760px) { .g-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .g-grid { grid-template-columns: repeat(4, 1fr); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2, 6, 23, 0.94); display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 78vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: 10px; }
.lightbox figcaption { color: #e2e8f0; margin-top: 14px; font-size: 1rem; }
.lightbox figcaption small { display: block; color: #94a3b8; font-size: 0.82rem; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.1rem; display: grid; place-items: center; transition: background 0.2s; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #94a3b8; padding: 64px 0 40px; }
.footer-grid { display: grid; gap: 32px; align-items: center; text-align: center; }
.footer h2 { color: #fff; font-size: 1.9rem; }
.footer h2 span { color: #14b8a6; }
.footer .tagline { font-size: 0.75rem; letter-spacing: 0.2em; color: #64748b; margin-top: 4px; }
.social { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.social a, .quick a { width: 40px; height: 40px; border-radius: 50%; background: #1e293b; border: 1px solid #334155; display: grid; place-items: center; color: #94a3b8; transition: 0.25s; }
.social a:hover, .quick a:hover { color: #fff; transform: translateY(-2px); }
.social a.s-fb:hover { background: #1877f2; border-color: #1877f2; }
.social a.s-in:hover { background: #0a66c2; border-color: #0a66c2; }
.social a.s-gh:hover { background: #fff; color: #000; border-color: #fff; }
.social a.s-be:hover { background: #1769ff; border-color: #1769ff; }
.social a.s-x:hover { background: #000; border-color: #444; }
.social a.s-ig:hover { background: #e4405f; border-color: #e4405f; }
.quick { display: flex; justify-content: center; gap: 16px; }
.quick a:hover { background: var(--teal); border-color: var(--teal); }
.copy { font-size: 0.9rem; }
.copy a { color: #e2e8f0; font-weight: 700; }
.copy a:hover { color: #14b8a6; }
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid > :first-child { text-align: left; }
  .footer-grid > :first-child .social { justify-content: flex-start; }
  .footer-grid > :last-child { text-align: right; }
}

.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; border: 0; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 90; display: grid; place-items: center; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--teal-dark); }

/* ---------- Contact dialog ---------- */
dialog.contact { border: 0; padding: 0; background: transparent; width: min(680px, 94vw); max-height: 90vh; overflow: visible; }
dialog.contact::backdrop { background: rgba(15, 23, 42, 0.62); backdrop-filter: blur(4px); }
.contact-box { background: var(--white); border-radius: 22px; padding: 28px 28px 32px; margin-top: 60px; text-align: center; position: relative; max-height: calc(90vh - 60px); overflow-y: auto; box-shadow: var(--shadow-lg); }
.contact-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1f5f9; color: #475569; z-index: 2; }
.contact-close:hover { color: #dc2626; }
.contact-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); margin: -86px auto 12px; background: #fff; position: relative; }
.contact-box h2 { font-size: 1.6rem; }
.contact-box .sub { color: var(--muted); margin-bottom: 8px; }
.contact-title { text-align: left; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 24px 0 10px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.link-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; font-size: 0.95rem; text-align: left; transition: 0.2s; background: #fff; }
.link-item:hover { background: #f8fafc; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.link-item i { width: 24px; text-align: center; font-size: 1.2rem; }
.c-fb { color: #1877f2; } .c-x { color: #000; } .c-ig { color: #e4405f; } .c-gh { color: #333; } .c-in { color: #0a66c2; } .c-be { color: #1769ff; } .c-wp { color: #21759b; } .c-ad { color: #b91c1c; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.contact-actions a { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px; border-radius: 10px; color: #fff; font-weight: 700; transition: opacity 0.2s; }
.contact-actions a:hover { opacity: 0.9; }
.ca-mail { background: #ea4335; }
.ca-anon { background: #8b5cf6; }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.18), transparent 45%), var(--ink); text-align: center; color: #cbd5e1; }
.nf-box { max-width: 560px; }
.nf .code { font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; line-height: 1; color: #14b8a6; letter-spacing: -0.04em; }
.nf h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 10px 0 12px; }
.nf p { color: #94a3b8; }
.nf code { background: #1e293b; color: #5eead4; padding: 2px 10px; border-radius: 6px; font-size: 0.9rem; word-break: break-all; display: inline-block; margin-top: 10px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.nf .btn-primary { background: #14b8a6; color: #04201d; }
.nf .btn-primary:hover { background: #2dd4bf; }
.nf .btn-ghost { color: #e2e8f0; border-color: #475569; }
.nf .btn-ghost:hover { background: #1e293b; color: #fff; border-color: #14b8a6; }
.nf-links { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; font-size: 0.95rem; }
.nf-links a { color: #94a3b8; }
.nf-links a:hover { color: #5eead4; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .nav, .to-top, .mobile-menu { display: none !important; }
  .hero { padding-top: 24px; }
}
