/* ==========================================
   EKRAMUL HAQUE — PORTFOLIO HOME PAGE
   Responsive, dark premium theme
========================================== */

:root {
  --bg: #080d18;
  --bg-soft: #0b1220;
  --surface: #0e1727;
  --surface-2: #111d30;
  --border: rgba(153, 170, 199, 0.15);
  --text: #f3f6ff;
  --muted: #9aa8bd;
  --muted-2: #73829b;
  --cyan: #61e6eb;
  --blue: #8c9cff;
  --purple: #a18aff;
  --heading: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
  --container: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.section-anchor { scroll-margin-top: 88px; }
.site-noise {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}
.ambient { position: absolute; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(130px); opacity: .11; pointer-events: none; }
.ambient-a { top: 70px; right: -170px; background: #00d9ff; }
.ambient-b { top: 1350px; left: -230px; background: #5c66ff; }
.gradient-text {
  color: var(--cyan);
  background: linear-gradient(105deg, #67e8f9 4%, #8c9cff 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.section { padding: 112px 0; }
.eyebrow { display: inline-block; color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: 2.2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 13, 24, .82);
  border-bottom: 1px solid rgba(153, 170, 199, .1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.nav { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 700 27px/1 var(--heading); letter-spacing: -1.5px; }
.brand span { color: var(--cyan); }
.nav-menu { display: flex; align-items: center; gap: 31px; }
.nav-link { color: #aab5c8; font-size: 13px; font-weight: 600; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--cyan); }
.nav-cta { display: inline-flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid rgba(97, 230, 235, .35); border-radius: 6px; font-size: 13px; font-weight: 700; transition: background .2s, border .2s; }
.nav-cta i { color: var(--cyan); font-size: 11px; }
.nav-cta:hover { background: rgba(97, 230, 235, .08); border-color: var(--cyan); }
.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; min-height: 670px; display: flex; align-items: center; padding: 66px 0 78px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 65px; }
.availability { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid rgba(97, 230, 235, .2); border-radius: 5px; color: #b9c8d8; background: rgba(97, 230, 235, .035); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.pulse-dot, .caption-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(97, 230, 235, .7); }
.pulse-dot { animation: pulse 2s infinite; }
.hero-kicker { margin-top: 30px; color: #aebbd0; font-size: 13px; font-weight: 600; letter-spacing: 3px; }
.hero h1 { margin-top: 5px; font: 700 clamp(58px, 6.3vw, 84px)/.99 var(--heading); letter-spacing: -5px; }
.hero h1 .gradient-text { display: inline-block; padding-bottom: 8px; }
.hero-role { margin-top: 22px; font: 500 clamp(18px, 2vw, 23px)/1.5 var(--heading); color: #dfe7f6; }
#typedRole { color: var(--cyan); }
.typing-cursor { color: var(--cyan); animation: blink .85s step-end infinite; }
.hero-description { max-width: 510px; margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; transition: transform .22s, background .22s, border-color .22s; cursor: pointer; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: #07111b; background: var(--cyan); border-color: var(--cyan); }
.button-primary:hover { background: #8bf1f3; }
.button-primary i { font-size: 12px; }
.button-secondary { color: var(--text); background: rgba(255,255,255,.015); border-color: var(--border); }
.button-secondary:hover { border-color: rgba(97,230,235,.65); background: rgba(97,230,235,.05); }
.hero-socials { display: flex; align-items: center; gap: 13px; margin-top: 36px; }
.hero-socials > span { margin-right: 5px; color: #75839b; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.hero-socials a, .footer-socials a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; color: #b4c0d2; font-size: 13px; transition: color .2s, border-color .2s, transform .2s; }
.hero-socials a:hover, .footer-socials a:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }

.hero-art { position: relative; min-height: 480px; display: grid; place-items: center; isolation: isolate; }
.hero-glow { position: absolute; width: 310px; height: 310px; border-radius: 50%; background: linear-gradient(135deg, rgba(97,230,235,.17), rgba(140,156,255,.13)); filter: blur(35px); }
.portrait-frame { position: relative; z-index: 2; width: min(350px, 77%); height: 405px; display: flex; align-items: end; justify-content: center; overflow: hidden; border: 1px solid rgba(97,230,235,.23); border-radius: 180px 180px 22px 22px; background: linear-gradient(155deg, rgba(20,40,60,.86), rgba(14,22,40,.6)); box-shadow: 0 30px 90px rgba(0,0,0,.24), inset 0 0 50px rgba(97,230,235,.04); }
.portrait-frame::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.07); border-radius: inherit; pointer-events: none; }
.portrait { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 15px 20px rgba(0,0,0,.2)); animation: float 5s ease-in-out infinite; }
.orbit { position: absolute; z-index: 0; border: 1px solid rgba(97,230,235,.16); border-radius: 50%; }
.orbit-outer { width: 440px; height: 440px; transform: rotate(-23deg) scaleY(.8); }
.orbit-inner { width: 370px; height: 370px; border-color: rgba(140,156,255,.15); transform: rotate(28deg) scaleY(.8); }
.floating-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px; padding: 12px 15px; border: 1px solid rgba(156,174,204,.18); border-radius: 9px; background: rgba(12,21,36,.92); box-shadow: 0 15px 40px rgba(0,0,0,.2); backdrop-filter: blur(12px); animation: float 5s ease-in-out infinite; }
.card-code { top: 95px; left: -2px; }
.card-stack { right: -7px; bottom: 86px; animation-delay: -2.3s; }
.mini-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; color: var(--cyan); background: rgba(97,230,235,.1); }
.mini-icon-purple { color: #b7a4ff; background: rgba(161,138,255,.12); }
.floating-card strong, .floating-card small { display: block; }
.floating-card strong { font-size: 11px; }
.floating-card small { margin-top: 2px; color: #8d9ab0; font-size: 9px; }
.hero-index { position: absolute; right: 0; bottom: 0; color: #718098; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.hero-index span { color: var(--cyan); }
.scroll-cue { position: absolute; left: max(24px, calc((100vw - var(--container)) / 2)); bottom: 24px; display: flex; align-items: center; gap: 12px; color: #6f7d94; font-size: 9px; letter-spacing: 1.8px; }
.scroll-line { display: inline-block; width: 34px; height: 1px; background: var(--cyan); }

/* Quick facts */
.quick-facts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 5px; padding: 25px 27px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(110deg, rgba(15,24,41,.98), rgba(10,17,30,.98)); }
.fact { display: flex; align-items: center; gap: 14px; padding: 5px 24px; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact-icon { display: grid; place-items: center; flex-shrink: 0; width: 43px; height: 43px; border: 1px solid rgba(97,230,235,.17); border-radius: 9px; color: var(--cyan); background: rgba(97,230,235,.06); }
.fact strong, .fact small { display: block; }
.fact strong { font: 600 13px var(--heading); }
.fact small { margin-top: 4px; color: var(--muted-2); font-size: 10px; }

/* Section headings */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 42px; }
.section-heading h2 { margin-top: 13px; font: 700 clamp(34px, 4vw, 46px)/1.2 var(--heading); letter-spacing: -1.8px; }
.section-intro { max-width: 390px; color: var(--muted); font-size: 13px; line-height: 1.95; }

/* About */
.about-section { padding-top: 140px; }
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 80px; }
.about-visual { position: relative; min-height: 410px; display: grid; place-items: center; }
.about-image-wrap { position: relative; z-index: 1; width: 300px; height: 365px; display: flex; align-items: end; justify-content: center; overflow: hidden; border: 1px solid rgba(97,230,235,.2); border-radius: 12px; background: linear-gradient(150deg, #13253a, #0c1423); }
.about-image-wrap img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.image-caption { position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: center; gap: 9px; padding: 15px; color: #d3deee; background: linear-gradient(transparent, rgba(5,10,20,.95)); font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.caption-dot { width: 6px; height: 6px; }
.about-decor { position: absolute; border: 1px solid rgba(97,230,235,.2); border-radius: 12px; }
.decor-one { width: 300px; height: 365px; transform: rotate(-7deg); }
.decor-two { width: 300px; height: 365px; transform: rotate(7deg); border-color: rgba(140,156,255,.18); }
.about-copy { padding: 10px 0; }
.about-lead { color: #e7edf8; font: 600 22px/1.55 var(--heading); letter-spacing: -.5px; }
.about-copy > p:not(.about-lead) { margin-top: 17px; color: var(--muted); font-size: 13px; line-height: 1.95; }
.about-points { display: grid; gap: 11px; margin-top: 23px; }
.about-points div { display: flex; align-items: center; gap: 10px; color: #c5d0e1; font-size: 12px; }
.about-points i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--cyan); background: rgba(97,230,235,.09); font-size: 9px; }
.about-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 27px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 12px; font-weight: 700; }
.text-link:hover { gap: 13px; }

/* Services */
.services-section { background: linear-gradient(180deg, transparent, rgba(255,255,255,.018), transparent); border-top: 1px solid rgba(153,170,199,.05); border-bottom: 1px solid rgba(153,170,199,.05); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.service-card { position: relative; min-height: 240px; padding: 25px; border: 1px solid var(--border); border-radius: 9px; background: linear-gradient(145deg, rgba(15,24,41,.96), rgba(10,17,30,.96)); transition: transform .25s, border-color .25s, background .25s; }
.service-card:hover { transform: translateY(-5px); border-color: rgba(97,230,235,.34); background: linear-gradient(145deg, #122033, #0c1524); }
.service-top { display: flex; align-items: center; justify-content: space-between; }
.service-icon { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(97,230,235,.18); border-radius: 9px; color: var(--cyan); background: rgba(97,230,235,.07); font-size: 17px; }
.service-number { color: #66748c; font: 600 11px var(--heading); }
.service-card h3 { margin-top: 23px; font: 600 17px/1.4 var(--heading); }
.service-card p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.service-link { display: inline-block; margin-top: 17px; color: #7c8ca5; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }

/* Skills */
.skills-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { padding: 31px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(145deg, #0e1727, #0a1220); }
.panel-label { color: var(--cyan); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.skills-copy h3 { max-width: 360px; margin-top: 15px; font: 600 25px/1.4 var(--heading); letter-spacing: -.7px; }
.skills-copy > p { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.skill-group { margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--border); }
.skill-group-head { display: flex; justify-content: space-between; align-items: center; color: #dce5f3; font: 600 13px var(--heading); }
.skill-group-head i { color: var(--cyan); font-size: 13px; }
.skill-group p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 25px; }
.tech-item { min-height: 106px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(153,170,199,.11); border-radius: 8px; background: rgba(255,255,255,.018); color: #bdc8d9; font-size: 10px; transition: transform .2s, border-color .2s; }
.tech-item:hover { transform: translateY(-3px); border-color: rgba(97,230,235,.35); }
.tech-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font: 700 19px var(--heading); }
.tech-html { color: #ff9878; background: rgba(255,113,71,.12); }
.tech-css { color: #7eaeff; background: rgba(73,138,255,.13); }
.tech-js { color: #f5df73; background: rgba(245,223,115,.12); font-size: 13px; }
.tech-react { color: #69ddf5; background: rgba(105,221,245,.1); }
.tech-node { color: #88d69b; background: rgba(100,190,120,.1); }
.tech-db { color: #c1a8ff; background: rgba(161,138,255,.12); font-size: 15px; }
.tech-git { color: #ff9878; background: rgba(255,113,71,.1); }
.tech-python { color: #8eb8ff; background: rgba(73,138,255,.1); }
.skills-note { margin-top: 20px; color: #718099; font-size: 10px; line-height: 1.8; }

/* Projects */
.projects-section { background: linear-gradient(180deg, rgba(255,255,255,.012), transparent); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.project-card { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #0c1422; transition: transform .25s, border-color .25s; }
.project-card:hover { transform: translateY(-5px); border-color: rgba(97,230,235,.3); }
.project-image { position: relative; display: block; height: 220px; overflow: hidden; background: #131e30; }
.project-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,10,20,.3), transparent 55%); pointer-events: none; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-image img { transform: scale(1.045); }
.project-view { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(8,13,24,.72); color: var(--cyan); }
.project-info { padding: 22px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.project-tags span { padding: 5px 8px; border: 1px solid rgba(153,170,199,.13); border-radius: 4px; color: #9caac0; font-size: 9px; }
.project-info h3 { margin-top: 15px; font: 600 18px/1.4 var(--heading); }
.project-info p { min-height: 65px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.project-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 15px; color: var(--cyan); font-size: 11px; font-weight: 700; }
.project-link i { transition: transform .2s; }
.project-link:hover i { transform: translateX(4px); }
.projects-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 29px; padding: 22px 25px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.015); }
.projects-bottom p { color: #c1ccdc; font-size: 12px; }

/* Contact */
.contact-section { padding-top: 70px; }
.contact-card { display: grid; grid-template-columns: 1fr .85fr; gap: 65px; padding: 48px; border: 1px solid rgba(97,230,235,.17); border-radius: 13px; background: radial-gradient(ellipse at 0% 0%, rgba(97,230,235,.07), transparent 45%), linear-gradient(120deg, #0e192a, #0b1220); }
.contact-intro h2 { margin-top: 15px; font: 700 clamp(34px, 4vw, 45px)/1.2 var(--heading); letter-spacing: -1.7px; }
.contact-intro > p { max-width: 450px; margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.contact-details { display: grid; gap: 17px; margin-top: 30px; }
.contact-detail { display: flex; align-items: center; gap: 13px; min-width: 0; }
.contact-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid rgba(97,230,235,.17); border-radius: 8px; color: var(--cyan); background: rgba(97,230,235,.06); }
.contact-detail small, .contact-detail strong { display: block; }
.contact-detail small { color: #7e8da4; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.contact-detail strong { margin-top: 3px; color: #d7e0ee; font-size: 12px; overflow-wrap: anywhere; }
.contact-form { padding: 27px; border: 1px solid var(--border); border-radius: 9px; background: rgba(7,13,24,.5); }
.form-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.form-heading h3 { font: 600 19px var(--heading); }
.form-heading span { color: #75839a; font-size: 10px; }
.contact-form label { display: block; margin: 14px 0 6px; color: #b7c3d5; font-size: 10px; font-weight: 600; }
.contact-form input, .contact-form textarea { display: block; width: 100%; border: 1px solid rgba(153,170,199,.16); border-radius: 6px; outline: none; background: rgba(255,255,255,.025); color: var(--text); font-size: 12px; transition: border-color .2s, background .2s; }
.contact-form input { height: 43px; padding: 0 12px; }
.contact-form textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #68778e; }
.contact-form input:focus, .contact-form textarea:focus { border-color: rgba(97,230,235,.55); background: rgba(97,230,235,.025); }
.form-submit { width: 100%; margin-top: 17px; }
.form-note { margin-top: 11px; color: #77859a; font-size: 9px; line-height: 1.7; text-align: center; }

/* Footer */
.site-footer { margin-top: 100px; border-top: 1px solid var(--border); }
.footer-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { color: #8492a8; font-size: 11px; }
.footer-inner p strong { color: #d0d9e8; font-weight: 600; }
.footer-socials { display: flex; gap: 9px; }
.footer-socials a { width: 32px; height: 32px; font-size: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 15px; padding: 15px max(24px, calc((100vw - var(--container)) / 2)); border-top: 1px solid rgba(153,170,199,.07); color: #68768c; font-size: 9px; }
.footer-bottom a { color: #9ba8bd; }
.footer-bottom a:hover { color: var(--cyan); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(97,230,235,.4); } 50% { box-shadow: 0 0 0 5px rgba(97,230,235,0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Tablet */
@media (max-width: 1000px) {
  .nav-menu { gap: 19px; }
  .hero-grid { gap: 35px; }
  .hero h1 { font-size: 70px; }
  .hero-art { min-height: 430px; }
  .portrait-frame { height: 360px; }
  .orbit-outer { width: 390px; height: 390px; }
  .orbit-inner { width: 330px; height: 330px; }
  .card-code { left: -7px; }
  .card-stack { right: -4px; }
  .fact { padding: 5px 14px; }
  .about-grid { gap: 45px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-card { gap: 35px; padding: 35px; }
}

/* Mobile navigation and layout */
@media (max-width: 760px) {
  .container { width: calc(100% - 36px); }
  .section { padding: 82px 0; }
  .nav { height: 72px; }
  .nav-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 43px; height: 43px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); cursor: pointer; }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: #eaf1ff; transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-menu { position: absolute; top: 72px; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid var(--border); background: rgba(8,13,24,.98); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .22s; }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { padding: 13px 4px; border-bottom: 1px solid rgba(153,170,199,.07); }
  .nav-cta { justify-content: center; margin-top: 12px; }
  .hero { min-height: auto; padding: 60px 0 78px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { position: relative; z-index: 3; }
  .hero h1 { font-size: clamp(60px, 13vw, 78px); letter-spacing: -4px; }
  .hero-description { max-width: 580px; font-size: 14px; }
  .hero-art { min-height: 420px; margin-top: 5px; }
  .portrait-frame { width: min(320px, 74%); height: 370px; }
  .orbit-outer { width: 390px; height: 390px; }
  .orbit-inner { width: 320px; height: 320px; }
  .card-code { top: 65px; left: 2%; }
  .card-stack { right: 1%; bottom: 70px; }
  .hero-index { right: 5px; bottom: 3px; }
  .scroll-cue { display: none; }
  .quick-facts { grid-template-columns: 1fr; gap: 13px; padding: 20px; }
  .fact { padding: 9px 4px; }
  .fact + .fact { padding-top: 17px; border-top: 1px solid var(--border); border-left: 0; }
  .about-section { padding-top: 95px; }
  .section-heading { display: block; margin-bottom: 32px; }
  .section-heading h2 { font-size: clamp(34px, 7vw, 43px); }
  .section-intro { margin-top: 15px; }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .about-visual { min-height: 370px; }
  .about-image-wrap, .about-decor { width: 270px; height: 335px; }
  .about-copy { padding: 0; }
  .about-lead { font-size: 20px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .service-card { min-height: 255px; padding: 20px; }
  .service-card h3 { font-size: 15px; }
  .service-card p { font-size: 11px; }
  .skills-layout { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }
  .project-image { height: 180px; }
  .project-info { padding: 17px; }
  .project-info h3 { font-size: 16px; }
  .project-info p { font-size: 11px; }
  .contact-card { grid-template-columns: 1fr; gap: 30px; padding: 28px; }
  .contact-intro h2 { font-size: 38px; }
  .site-footer { margin-top: 75px; }
}

/* Small mobile */
@media (max-width: 520px) {
  .hero { padding-top: 45px; }
  .availability { font-size: 9px; letter-spacing: 1.1px; }
  .hero h1 { font-size: 59px; }
  .hero-role { font-size: 18px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-socials { margin-top: 26px; }
  .hero-art { min-height: 355px; }
  .portrait-frame { width: 72%; height: 315px; }
  .hero-glow { width: 230px; height: 230px; }
  .orbit-outer { width: 310px; height: 310px; }
  .orbit-inner { width: 270px; height: 270px; }
  .floating-card { padding: 9px 10px; gap: 8px; }
  .mini-icon { width: 30px; height: 30px; font-size: 12px; }
  .floating-card strong { font-size: 10px; }
  .floating-card small { font-size: 8px; }
  .card-code { top: 45px; left: -2px; }
  .card-stack { right: -2px; bottom: 47px; }
  .quick-facts { margin-top: 0; }
  .section-heading h2 { font-size: 34px; letter-spacing: -1.2px; }
  .about-visual { min-height: 330px; }
  .about-image-wrap, .about-decor { width: 240px; height: 300px; }
  .about-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { min-height: auto; padding: 23px; }
  .service-card p { font-size: 12px; }
  .panel { padding: 23px; }
  .tech-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .tech-item { min-height: 88px; font-size: 9px; }
  .tech-logo { width: 32px; height: 32px; font-size: 16px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-image { height: 220px; }
  .project-info p { min-height: 0; }
  .projects-bottom { align-items: flex-start; flex-direction: column; }
  .contact-card { padding: 22px; }
  .contact-intro h2 { font-size: 33px; }
  .contact-form { padding: 20px; }
  .contact-detail strong { font-size: 11px; }
  .footer-inner { flex-wrap: wrap; padding: 22px 0; }
  .footer-inner p { order: 3; width: 100%; }
  .footer-bottom { padding: 14px 18px; }
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ==========================================
   RESPONSIVE HARDENING — ALL SCREEN SIZES
========================================== */
html { max-width: 100%; overflow-x: clip; }
body { width: 100%; max-width: 100%; overflow-x: clip; }
main, header, footer, section, .container, .hero-grid, .about-grid,
.skills-layout, .contact-card, .projects-grid, .services-grid { min-width: 0; }
.hero-copy, .hero-art, .about-copy, .about-visual, .panel, .project-card,
.service-card, .contact-intro, .contact-form { min-width: 0; }
.hero-role, .hero-description, .section-intro, .about-copy p,
.service-card p, .project-info p, .contact-intro p, .contact-detail strong {
  overflow-wrap: anywhere;
}
.project-image img, .about-image-wrap img, .portrait { max-width: 100%; }
input, textarea, select, button { max-width: 100%; }

@media (max-width: 1100px) {
  .container { width: min(var(--container), calc(100% - 40px)); }
  .hero-grid { gap: 38px; }
  .section { padding-block: 94px; }
  .contact-card { gap: 28px; }
}

@media (max-width: 760px) {
  .site-header { position: sticky; top: 0; }
  .nav { position: relative; height: 70px; }
  .nav-menu { z-index: 120; max-height: calc(100dvh - 70px); overflow-y: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { width: 100%; }
  .hero-art { width: 100%; max-width: 480px; margin-inline: auto; overflow: clip; }
  .hero h1 { line-height: .98; }
  .hero-role { line-height: 1.5; overflow-wrap: anywhere; }
  .hero-actions { gap: 12px; }
  .hero-actions .button { justify-content: center; }
  .quick-facts { width: calc(100% - 36px); }
  .about-grid, .skills-layout, .contact-card { grid-template-columns: minmax(0, 1fr); }
  .about-visual { width: 100%; max-width: 380px; margin-inline: auto; }
  .services-grid, .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card, .project-card, .panel { min-width: 0; }
  .contact-card { align-items: stretch; }
  .contact-form { width: 100%; min-width: 0; }
  .contact-form input, .contact-form textarea { width: 100%; min-width: 0; }
  .footer-inner { gap: 18px; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  .section { padding-block: 68px; }
  .nav { height: 66px; }
  .nav-menu { top: 66px; max-height: calc(100dvh - 66px); }
  .brand { font-size: 25px; }
  .hero { padding: 42px 0 58px; }
  .hero h1 { font-size: clamp(48px, 15vw, 62px); letter-spacing: -3px; }
  .hero-role { font-size: clamp(16px, 4.5vw, 19px); }
  .hero-description { font-size: 14px; line-height: 1.8; }
  .hero-art { min-height: 330px; }
  .portrait-frame { width: min(72%, 260px); height: 295px; }
  .orbit-outer { width: min(310px, 92vw); height: min(310px, 92vw); }
  .orbit-inner { width: min(265px, 80vw); height: min(265px, 80vw); }
  .card-code { left: 0; top: 38px; }
  .card-stack { right: 0; bottom: 40px; }
  .hero-index { right: 2px; font-size: 9px; }
  .hero-socials { flex-wrap: wrap; }
  .section-heading h2 { font-size: clamp(30px, 9vw, 36px); }
  .about-visual { min-height: 310px; }
  .about-image-wrap, .about-decor { width: min(240px, 76vw); height: 290px; }
  .about-copy p { font-size: 14px; }
  .services-grid, .projects-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card { padding: 23px; }
  .service-card h3 { font-size: 18px; }
  .service-card p, .project-info p { font-size: 13px; line-height: 1.75; }
  .project-image { height: clamp(190px, 60vw, 240px); }
  .project-info h3 { font-size: 18px; }
  .tech-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tech-item { min-width: 0; overflow-wrap: anywhere; }
  .contact-card { padding: 18px; gap: 26px; }
  .contact-intro h2 { font-size: clamp(28px, 9vw, 34px); }
  .contact-detail { align-items: flex-start; }
  .contact-detail strong { overflow-wrap: anywhere; }
  .contact-form { padding: 18px; }
  .form-submit { width: 100%; justify-content: center; }
  .footer-inner { align-items: flex-start; }
  .footer-socials { margin-left: auto; }
  .footer-bottom { gap: 10px; flex-wrap: wrap; font-size: 11px; }
}

@media (max-width: 360px) {
  .container { width: calc(100% - 26px); }
  .hero h1 { font-size: 47px; }
  .availability { max-width: 100%; white-space: normal; }
  .hero-art { min-height: 300px; }
  .portrait-frame { height: 265px; }
  .floating-card { max-width: 155px; }
  .floating-card strong { font-size: 9px; }
  .floating-card small { font-size: 8px; }
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card, .contact-form { padding: 15px; }
}
